Amazon.IdentityManagement.AmazonIdentityManagementServiceClient.DetachRolePolicyAsync C# (CSharp) Méthode

DetachRolePolicyAsync() public méthode

Initiates the asynchronous execution of the DetachRolePolicy operation.
public DetachRolePolicyAsync ( DetachRolePolicyRequest request, DetachRolePolicyResponse>.AmazonServiceCallback callback, AsyncOptions options = null ) : void
request Amazon.IdentityManagement.Model.DetachRolePolicyRequest Container for the necessary parameters to execute the DetachRolePolicy operation on AmazonIdentityManagementServiceClient.
callback DetachRolePolicyResponse>.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.
Résultat void
        public void DetachRolePolicyAsync(DetachRolePolicyRequest request, AmazonServiceCallback<DetachRolePolicyRequest, DetachRolePolicyResponse> callback, AsyncOptions options = null)
        {
            options = options == null?new AsyncOptions():options;
            var marshaller = new DetachRolePolicyRequestMarshaller();
            var unmarshaller = DetachRolePolicyResponseUnmarshaller.Instance;
            Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
            if(callback !=null )
                callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
                    AmazonServiceResult<DetachRolePolicyRequest,DetachRolePolicyResponse> responseObject 
                            = new AmazonServiceResult<DetachRolePolicyRequest,DetachRolePolicyResponse>((DetachRolePolicyRequest)req, (DetachRolePolicyResponse)res, ex , ao.State);    
                        callback(responseObject); 
                };
            BeginInvoke<DetachRolePolicyRequest>(request, marshaller, unmarshaller, options, callbackHelper);
        }

Same methods

AmazonIdentityManagementServiceClient::DetachRolePolicyAsync ( DetachRolePolicyRequest request, System cancellationToken = default(CancellationToken) ) : Task
AmazonIdentityManagementServiceClient