# Account Methods

class `rucio.client.accountclient.``AccountClient`(rucio_host=None, auth_host=None, account=None, ca_cert=None, auth_type=None, creds=None, timeout=600, user_agent='rucio-clients')

  Bases: `rucio.client.baseclient.BaseClient`

  Account client class for working with rucio accounts

  `ACCOUNTS_BASEURL` = 'accounts'
  `add_account`(account, type, email)

    Sends the request to create a new account.

    Parameters: | account – the name of the account. type – The account type email – The Email address associated with the account.
    Returns: | True if account was created successfully else False.
    Raises: | Duplicate – if account already exists.

  `add_account_attribute`(account, key, value)

    Adds an attribute to an account.

    Parameters: | account – The account name. key – The attribute key. value – The attribute value.

  `add_identity`(account, identity, authtype, email, default=False)

    Adds a membership association between identity and account.

    Parameters: | account – The account name. identity – The identity key name. For example x509 DN, or a username. authtype – The type of the authentication (x509, gss, userpass). default – If True, the account should be used by default with the provided identity. email – The Email address associated with the identity.

  `del_identity`(account, identity, authtype, default=False)

    Delete an identity’s membership association with an account.

    Parameters: | account – The account name. identity – The identity key name. For example x509 DN, or a username. authtype – The type of the authentication (x509, gss, userpass). default – If True, the account should be used by default with the provided identity.

  `delete_account`(account)

    Sends the request to disable an account.

    Parameters: | account – the name of the account.
    Returns: | True is account was disabled successfully. False otherwise.
    Raises: | AccountNotFound – if account doesn’t exist.

  `delete_account_attribute`(account, key)

    Delete an attribute for an account.

    Parameters: | account – The account name. key – The attribute key.

  `get_account`(account)

    Sends the request to get information about a given account.

    Parameters: | account – the name of the account.
    Returns: | a list of attributes for the account. None if failure.
    Raises: | AccountNotFound – if account doesn’t exist.

  `get_account_limit`(account, rse)

    List the account rse limits of this account for the specific rse.

    Parameters: | account – The account name. rse – The rse name.

  `get_account_limits`(account)

    List the account rse limits of this account.

    Parameters: | account – The account name.

  `get_account_usage`(account, rse=None)

    List the account usage for one or all rses of this account.

    Parameters: | account – The account name. rse – The rse name.

  `list_account_attributes`(account)

    List the attributes for an account.

    Parameters: | account – The account name.

  `list_account_rules`(account)

    List the associated rules of an account.

    Parameters: | account – The account name.

  `list_accounts`(account_type=None, identity=None, filters=None)

    Sends the request to list all rucio accounts.

    Parameters: | type – The account type identity – The identity key name. For example x509 DN, or a username. filters – A dictionnary key:account attribute to use for the filtering
    Returns: | a list containing account info dictionary for all rucio accounts.
    Raises: | AccountNotFound – if account doesn’t exist.

  `list_identities`(account)

    List all identities on an account.

    Parameters: | account – The account name.

  `set_account_status`(account, status)

    Set the status of an account.

    Parameters: | account – Name of the account. status – The status for the account.

  `whoami`()

    Get information about account whose token is used

    Returns: | a list of attributes for the account. None if failure.
    Raises: | AccountNotFound – if account doesn’t exist.