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 is DATASET).
  • generic
    Specifies whether the resource is generic or not (ignored unless the class is DATASET).

πŸ“€ Returns

  • Union[dict, bytes]
    Returns a Security Result dictionary or Security Request XML bytes if the AccessAdmin.generate_requests_only class attribute is set to True.

❌ Raises

  • SecurityRequestError
    Raises SecurityRequestError when the SAF Return Code of a Security Result is equal to 4.
  • DownstreamFatalError
    Raises DownstreamFatalError when the SAF Return Code of a Security Result is greater than 4.

πŸ’» 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"
  }
}