Delete
Delete a z/OS userid.
UserAdmin.delete()
def delete(self, userid: str) -> Union[dict, bytes]:
📄 Description
Delete a z/OS userid.
📥 Parameters
userid
The z/OS userid to delete.
📤 Returns
Union[dict, bytes]
Returns a Security Result dictionary or Security Request XML bytes if theUserAdmin.generate_requests_only
class attribute is set toTrue
.
❌ Raises
SecurityRequestError
RaisesSecurityRequestError
when the SAF Return Code of a Security Result is equal to4
.DownstreamFatalError
RaisesDownstreamFatalError
when the SAF Return Code of a Security Result is greater than4
.
💻 Example
Python REPL
>>> from pyracf import UserAdmin
>>> user_admin = UserAdmin()
>>> user_admin.delete("squdwrd")
{'securityResult': {'user': {'name': 'SQUIDWRD', 'operation': 'del', 'requestId': 'UserRequest', 'commands': [{'safReturnCode': 0, 'returnCode': 0, 'reasonCode': 0, 'image': 'DELUSER SQUIDWRD'}]}, 'returnCode': 0, 'reasonCode': 0, 'runningUserid': 'testuser'}}
Security Result Dictionary as JSON
{
"securityResult": {
"user": {
"name": "SQUIDWRD",
"operation": "del",
"requestId": "UserRequest",
"commands": [
{
"safReturnCode": 0,
"returnCode": 0,
"reasonCode": 0,
"image": "DELUSER SQUIDWRD"
}
]
},
"returnCode": 0,
"reasonCode": 0,
"runningUserid": "testuser"
}
}