4.3.2.1. UpdateUser

class dyn.tm.accounts.UpdateUser(*args, **kwargs)[source]

UpdateUser type objects are a special form of a User which are tied to a specific Dynamic DNS services.

__init__(*args, **kwargs)[source]

Create an UpdateUser object

Parameters:
  • user_name – the Username this UpdateUser uses or will use to log in to the DynECT System. A UpdateUser‘s user_name is required for both creating and getting UpdateUser‘s.
  • nickname – When creating a new UpdateUser on the DynECT System, this nickname will be the System nickname for this UpdateUser
  • password – When creating a new UpdateUser on the DynECT System, this password will be the password this UpdateUser uses to log into the System
block()[source]

Set the status of this UpdateUser to ‘blocked’. This will prevent this UpdateUser from logging in until they are explicitly unblocked.

delete()[source]

Delete this UpdateUser from the DynECT System. It is important to note that this operation may not be undone.

nickname

This UpdateUser`s `nickname. An UpdateUser‘s nickname is a read-only property which can not be updated after the UpdateUser has been created.

password

The current password for this UpdateUser. An UpdateUser‘s password may be reassigned.

status

The current status of an UpdateUser will be one of either ‘active’ or ‘blocked’. Blocked UpdateUser‘s are unable to log into the DynECT System, where active UpdateUser‘s are.

sync_password()[source]

Pull in this UpdateUser current password from the DynECT System, in the unlikely event that this UpdateUser object’s password may have gotten out of sync

unblock()[source]

Set the status of this UpdateUser to ‘active’. This will re-enable this UpdateUser to be able to login if they were previously blocked.

user_name

This UpdateUser‘s user_name. An UpdateUser‘s user_name is a read-only property which can not be updated after the UpdateUser has been created.

4.3.2.1.1. UpdateUser Examples

The following examples highlight how to use the UpdateUser class to get/create UpdateUser‘s on the dyn.tm System and how to edit these objects from within a Python script.

4.3.2.1.1.1. Creating a new UpdateUser

The following example shows how to create a new UpdateUser on the dyn.tm System and how to edit some of the fields using the returned UpdateUser object.

>>> from dyn.tm.accounts import UpdateUser
>>> # Create a dyn.tmSession
>>> new_user = UpdateUser('ausername', 'anickname', 'passw0rd')
>>> new_user.user_name
u'ausername'
>>> newuser.nickname
u'anickname'
>>> new_user.block()
>>> new_user.status
u'blocked'
>>> new_user.unblock()
>>> new_user.password = 'anewpassword'
>>> new_user.password
u'anewpassword'

4.3.2.1.1.2. Getting an Existing UpdateUser

The following example shows how to get an existing UpdateUser from the dyn.tm System and how to edit some of the same fields mentioned above.

>>> from dyn.tm.accounts import UpdateUser
>>> # Create a dyn.tmSession
>>> my_user = UpdateUser('myusername')
>>> my_user.user_name
u'myusername'
>>> my_user.status
u'blocked'
>>> my_user.unblock()
>>> my_user.status
u'active'