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

DeleteRoleAsync() public méthode

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

Same methods

AmazonIdentityManagementServiceClient::DeleteRoleAsync ( DeleteRoleRequest request, System cancellationToken = default(CancellationToken) ) : Task
AmazonIdentityManagementServiceClient