Universal Access
General Resource Profile Administration functions for checking a General Resource Profileβs Universal Access Attribute.
  ResourceAdmin.get_universal_access() 
 def get_universal_access(self, resource: str, class_name: str) -> Union[str, bytes, None]:
π Description
Check the Universal Access Attribute for a general resource profile.
π₯ Parameters
-  resource
 The general resource profile for which RACF should check the universal access attribute.
-  class_name
 The name of the class the general resource profile being checked belongs to.
π€ Returns
- Union[str, bytes, None]
 Returns- Nonewhen the general resource profile has no Universal Access defined, otherwise returns the access level as a string. If the- ResourceAdmin.generate_requests_onlyclass attribute is set to- True, concatenated Security Request XML bytes will be returned.
β Raises
- SecurityRequestError
 Raises- SecurityRequestErrorwhen the SAF Return Code of a Security Result is equal to- 4.
- DownstreamFatalError
 Raises- DownstreamFatalErrorwhen the SAF Return Code of a Security Result is greater than- 4.
π» Example
Python REPL
>>> from pyracf import ResourceAdmin
>>> resource_admin = ResourceAdmin()
>>> resource_admin.get_universal_access("TESTING","ELIJTEST")
"read"
  ResourceAdmin.set_universal_access() 
 def set_universal_access(
    self,
    resource: str,
    class_name: str,
    universal_access: str,
) -> Union[dict, bytes]:
π Description
Set the Universal Access Attribute for a general resource profile.
π₯ Parameters
-  resource
 The general resource profile for which RACF should set the universal access attribute.
-  class_name
 The name of the class the general resource profile being altered belongs to.
-  universal_access
 The Universal Access level to set for the specified general resource profile.
π€ Returns
- Union[dict, bytes]
 Returns a Security Result Steps dictionary or Concatenated Security Request XML bytes if the- ResourceAdmin.generate_requests_onlyclass attribute is set to- True.
β Raises
- SecurityRequestError
 Raises- SecurityRequestErrorwhen the SAF Return Code of a Security Result is equal to- 4.
- DownstreamFatalError
 Raises- DownstreamFatalErrorwhen the SAF Return Code of a Security Result is greater than- 4.
- AlterOperationError
 Raises- AlterOperationErrorwhen the general resource profile cannot be altered because it does NOT exist.
π» Example
Python REPL
>>> from pyracf import ResourceAdmin
>>> resource_admin = ResourceAdmin()
>>> resource_admin.get_universal_access("TESTING","ELIJTEST","ALTER")
{"step1":{"securityResult":{"resource":{"name":"TESTING","class":"ELIJTEST","operation":"set","requestId":"ResourceRequest","info":["Definition exists. Add command skipped due  to precheck option"],"commands":[{"safReturnCode":0,"returnCode":0,"reasonCode":0,"image":"RALTER  ELIJTEST             (TESTING)  UACC        (Alter)","messages":["ICH11009I RACLISTED PROFILES FOR ELIJTEST WILL NOT REFLECT THE UPDATE(S) UNTIL A SETROPTS REFRESH IS ISSUED."]}]},"returnCode":0,"reasonCode":0}}}
Security Result Steps Dictionary as JSON
{
  "step1":{
    "securityResult": {
      "resource": {
        "name": "TESTING",
        "class": "ELIJTEST",
        "operation": "set",
        "requestId": "ResourceRequest",
        "info": [
          "Definition exists. Add command skipped due  to precheck option"
        ],
        "commands": [
          {
            "safReturnCode": 0,
            "returnCode": 0,
            "reasonCode": 0,
            "image": "RALTER  ELIJTEST             (TESTING)  UACC        (Alter)",
            "messages": [
              "ICH11009I RACLISTED PROFILES FOR ELIJTEST WILL NOT REFLECT THE UPDATE(S) UNTIL A SETROPTS REFRESH IS ISSUED."
            ]
          }
        ]
      },
      "returnCode": 0,
      "reasonCode": 0
    }
  }
}