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

GetRoleAsync() public method

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

Same methods

AmazonIdentityManagementServiceClient::GetRoleAsync ( GetRoleRequest request, System cancellationToken = default(CancellationToken) ) : Task
AmazonIdentityManagementServiceClient