Delete
Delete a userβs access to a group
AccessAdmin.delete()
def delete(
self,
resource: str,
class_name: str,
auth_id: str,
volume: Union[str, None] = None,
generic: bool = False,
) -> Union[dict, bytes]:
π Description
Delete a specified permission
π₯ Parameters
resource
The general resource profile to delete this permission from.class_name
The class that the specified resource profile belongs to.auth_id
The z/OS userid or group name of the user or group to receive the permission.volume
The volume that the specified data set resides on (ignored unless the class isDATASET
).generic
Specifies whether the resource is generic or not (ignored unless the class isDATASET
).
π€ Returns
Union[dict, bytes]
Returns a Security Result dictionary or Security Request XML bytes if theAccessAdmin.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 AccessAdmin
>>> access_admin = AccessAdmin()
>>> access_admin.delete("TESTING", "ELIJTEST", "ESWIFT")
{'securityResult': {'permission': {'name': 'TESTING', 'class': 'ELIJTEST', 'operation': 'del', 'requestId': 'AccessRequest', 'commands': [{'safReturnCode': 0, 'returnCode': 0, 'reasonCode': 0, 'image': 'PERMIT TESTING CLASS(ELIJTEST) DELETE ID (ESWIFT)', 'messages': ['ICH06011I RACLISTED PROFILES FOR ELIJTEST WILL NOT REFLECT THE UPDATE(S) UNTIL A SETROPTS REFRESH IS ISSUED']}]}, 'returnCode': 0, 'reasonCode': 0, 'runningUserid': 'testuser'}}
Security Result Dictionary as JSON
{
"securityResult": {
"permission": {
"name": "TESTING",
"class": "ELIJTEST",
"operation": "del",
"requestId": "AccessRequest",
"commands": [
{
"safReturnCode": 0,
"returnCode": 0,
"reasonCode": 0,
"image": "PERMIT TESTING CLASS(ELIJTEST) DELETE ID (ESWIFT)",
"messages": [
"ICH06011I RACLISTED PROFILES FOR ELIJTEST WILL NOT REFLECT THE UPDATE(S) UNTIL A SETROPTS REFRESH IS ISSUED"
]
}
]
},
"returnCode": 0,
"reasonCode": 0,
"runningUserid": "testuser"
}
}