Delete
Delete a general resource profile.
ResourceAdmin.delete()
def delete(self, resource: str, class_name: str) -> Union[dict, bytes]:
📄 Description
Delete an existing general resource profile.
📥 Parameters
-
resource
The name of the general resource profile being deleted. -
class_name
The name of the class the general resource profile being deleted belongs to.
📤 Returns
Union[dict, bytes]
Returns a Security Result dictionary or Security Request XML bytes if theResourceAdmin.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 ResourceAdmin
>>> resource_admin = ResourceAdmin()
>>> resource_admin.delete("TESTING","ELIJTEST")
{"securityResult":{"resource":{"name":"TESTING","class":"ELIJTEST","operation":"del","requestId":"ResourceRequest","commands":[{"safReturnCode":0,"returnCode":0,"reasonCode":0,"image":"RDELETE ELIJTEST (TESTING) ","messages":["ICH12002I RACLISTED PROFILES FOR ELIJTEST WILL NOT REFLECT THE DELETION(S) UNTIL A SETROPTS REFRESH IS ISSUED."]}]},"returnCode":0,"reasonCode":0}}
Security Result Dictionary as JSON
{
"securityResult": {
"resource": {
"name": "TESTING",
"class": "ELIJTEST",
"operation": "del",
"requestId": "ResourceRequest",
"commands": [
{
"safReturnCode": 0,
"returnCode": 0,
"reasonCode": 0,
"image": "RDELETE ELIJTEST (TESTING) ",
"messages": [
"ICH12002I RACLISTED PROFILES FOR ELIJTEST WILL NOT REFLECT THE DELETION(S) UNTIL A SETROPTS REFRESH IS ISSUED."
]
}
]
},
"returnCode": 0,
"reasonCode": 0,
"runningUserid": "testuser"
}
}