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

SimulateCustomPolicyAsync() public method

Initiates the asynchronous execution of the SimulateCustomPolicy operation.
public SimulateCustomPolicyAsync ( SimulateCustomPolicyRequest request, SimulateCustomPolicyResponse>.AmazonServiceCallback callback, AsyncOptions options = null ) : void
request SimulateCustomPolicyRequest Container for the necessary parameters to execute the SimulateCustomPolicy operation on AmazonIdentityManagementServiceClient.
callback SimulateCustomPolicyResponse>.AmazonServiceCallback An Action delegate that is invoked when the operation completes.
options 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 SimulateCustomPolicyAsync(SimulateCustomPolicyRequest request, AmazonServiceCallback<SimulateCustomPolicyRequest, SimulateCustomPolicyResponse> callback, AsyncOptions options = null)
        {
            options = options == null?new AsyncOptions():options;
            var marshaller = new SimulateCustomPolicyRequestMarshaller();
            var unmarshaller = SimulateCustomPolicyResponseUnmarshaller.Instance;
            Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
            if(callback !=null )
                callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
                    AmazonServiceResult<SimulateCustomPolicyRequest,SimulateCustomPolicyResponse> responseObject 
                            = new AmazonServiceResult<SimulateCustomPolicyRequest,SimulateCustomPolicyResponse>((SimulateCustomPolicyRequest)req, (SimulateCustomPolicyResponse)res, ex , ao.State);    
                        callback(responseObject); 
                };
            BeginInvoke<SimulateCustomPolicyRequest>(request, marshaller, unmarshaller, options, callbackHelper);
        }

Same methods

AmazonIdentityManagementServiceClient::SimulateCustomPolicyAsync ( SimulateCustomPolicyRequest request, System cancellationToken = default(CancellationToken) ) : Task
AmazonIdentityManagementServiceClient