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

SimulatePrincipalPolicyAsync() public method

Initiates the asynchronous execution of the SimulatePrincipalPolicy operation.
public SimulatePrincipalPolicyAsync ( SimulatePrincipalPolicyRequest request, SimulatePrincipalPolicyResponse>.AmazonServiceCallback callback, AsyncOptions options = null ) : void
request SimulatePrincipalPolicyRequest Container for the necessary parameters to execute the SimulatePrincipalPolicy operation on AmazonIdentityManagementServiceClient.
callback SimulatePrincipalPolicyResponse>.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 SimulatePrincipalPolicyAsync(SimulatePrincipalPolicyRequest request, AmazonServiceCallback<SimulatePrincipalPolicyRequest, SimulatePrincipalPolicyResponse> callback, AsyncOptions options = null)
        {
            options = options == null?new AsyncOptions():options;
            var marshaller = new SimulatePrincipalPolicyRequestMarshaller();
            var unmarshaller = SimulatePrincipalPolicyResponseUnmarshaller.Instance;
            Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
            if(callback !=null )
                callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
                    AmazonServiceResult<SimulatePrincipalPolicyRequest,SimulatePrincipalPolicyResponse> responseObject 
                            = new AmazonServiceResult<SimulatePrincipalPolicyRequest,SimulatePrincipalPolicyResponse>((SimulatePrincipalPolicyRequest)req, (SimulatePrincipalPolicyResponse)res, ex , ao.State);    
                        callback(responseObject); 
                };
            BeginInvoke<SimulatePrincipalPolicyRequest>(request, marshaller, unmarshaller, options, callbackHelper);
        }

Same methods

AmazonIdentityManagementServiceClient::SimulatePrincipalPolicyAsync ( SimulatePrincipalPolicyRequest request, System cancellationToken = default(CancellationToken) ) : Task
AmazonIdentityManagementServiceClient