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

CreateAccountAliasAsync() public method

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

Same methods

AmazonIdentityManagementServiceClient::CreateAccountAliasAsync ( CreateAccountAliasRequest request, System cancellationToken = default(CancellationToken) ) : Task
AmazonIdentityManagementServiceClient