Amazon.IdentityManagement.AmazonIdentityManagementServiceClient.DeactivateMFADeviceAsync C# (CSharp) Method

DeactivateMFADeviceAsync() public method

Initiates the asynchronous execution of the DeactivateMFADevice operation.
public DeactivateMFADeviceAsync ( DeactivateMFADeviceRequest request, DeactivateMFADeviceResponse>.AmazonServiceCallback callback, AsyncOptions options = null ) : void
request Amazon.IdentityManagement.Model.DeactivateMFADeviceRequest Container for the necessary parameters to execute the DeactivateMFADevice operation on AmazonIdentityManagementServiceClient.
callback DeactivateMFADeviceResponse>.AmazonServiceCallback An Action delegate that is invoked when the operation completes.
options Amazon.Runtime.AsyncOptions A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
return void
        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);
        }

Same methods

AmazonIdentityManagementServiceClient::DeactivateMFADeviceAsync ( DeactivateMFADeviceRequest request, System cancellationToken = default(CancellationToken) ) : Task
AmazonIdentityManagementServiceClient