Alter

Alter the current RACF Options.

SetroptsAdmin.alter()

def alter(self, options: dict = {}) -> Union[dict, bytes]:

📄 Description

 

Only a subset of available Options are considered Stable. See Options for more details.

 

Alter the current RACF Options.

📥 Parameters

  • options
    A dictionary of the RACF Options being altered. See Options to see what all of the valid RACF Options are.

📤 Returns

  • Union[dict, bytes]
    Returns a Security Result dictionary or Security Request XML bytes if the SetroptsAdmin.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.
  • SegmentTraitError
    Raises SegmentTraitError when the dictionary of traits/attributes provided contains one or more unknown traits.

💻 Example

The following example alters the RACF Options with options to alter specified in the options dictionary.

Python Script
from pyracf import GrouAdmin
setropts_admin = SetroptsAdmin()

options = {
    "base:raclist": "ELIJTEST",
}

setropts_admin.alter(options=options)
Security Result Dictionary as JSON
{
  "securityResult": {
    "systemSettings": {
      "operation": "set",
      "requestId": "SetroptsRequest",
      "commands": [
        {
          "safReturnCode": 0,
          "returnCode": 0,
          "reasonCode": 0,
          "image": "SETROPTS      RACLIST     (elijtest)",
          "messages": [
            "ICH14063I SETROPTS command complete."
          ]
        }
      ]
    },
    "returnCode": 0,
    "reasonCode": 0,
    "runningUserid": "testuser"
  }
}