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

GetPolicyVersionAsync() public method

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

Same methods

AmazonIdentityManagementServiceClient::GetPolicyVersionAsync ( GetPolicyVersionRequest request, System cancellationToken = default(CancellationToken) ) : Task
AmazonIdentityManagementServiceClient