salt.modules.namecheap_users module

Namecheap users management

New in version 2017.7.0.

Use this module to manage users through the namecheap api. The Namecheap settings will be set in grains.

  • This module uses the following python libraries to communicate to the namecheap API:

    • requests
    pip install requests
  • As saltstack depends on requests this shouldn't be a problem

  • The namecheap username, api key and url should be set in a minion configuration file or pillar companyname
    namecheap.key: a1b2c3d4e5f67a8b9c0d1e2f3
    #Real url
    #Sandbox url
    #namecheap.url: https://api.sandbox.namecheap.xml.response

Checks if the provided minimum value is present in the user's account.

Returns a boolean. Returns False if the user's account balance is less than the provided minimum or True if greater than the minimum.

The value to check. Defaults to 100.

CLI Example:

salt 'my-minion' namecheap_users.check_balances
salt 'my-minion' namecheap_users.check_balances minimum=150

Gets information about fund in the user's account. This method returns the following information: Available Balance, Account Balance, Earned Amount, Withdrawable Amount and Funds Required for AutoRenew.

NOTE: If a domain setup with automatic renewal is expiring within the next 90 days, the FundsRequiredForAutoRenew attribute shows the amount needed in your Namecheap account to complete auto renewal.

returns a dictionary of the results

CLI Example:

salt 'my-minion' namecheap_users.get_balances