cps_assign_computer_role

Assigns a computer role.

Path:
/lib/jobs/cps_assign_computer_role.js

Parameters:

NameTypeDescription
ScopeTypeStringThe scope for the role.
ResourceIdStringThe ID of the resource for which the role is being assigned.
RoleNameStringThe name of the role to assign.
RoleDescriptionStringA description of the role to assign.
RoleZoneDnString
RoleZoneCanonicalNameString
RequestedOptionsObject
RequestedOptions.AssignmentTypeString
RequestedOptions.StartGrantValueInteger
RequestedOptions.StartTimeIntervalInteger
RequestedOptions.EndGrantValueInteger
RequestedOptions.EndTimeIntervalInteger
ReasonStringThe reason for the assignment.

Example Request:

POST /jobflow/startjob

{  
   "script":"/lib/jobs/cps_assign_computer_role.js",
   "args":{  
      "ScopeType":"Computer",
      "ResourceId":"be1234...",
      "RoleName":"AAAA - Unix Admin/AIX",
      "RoleDescription":"Role ofr root equivalent.  Custom Role by Bob.  Unix Admin",
      "RoleZoneDn":"CN=AIX,CN=Global,CN=Zones,OU=Centrify,DC=resource,DC=centrify,DC=lab",
      "RoleZoneCanonicalName":"test.com/test/Zones/Global/ABC",
      "RequestedOptions":{  
         "AssignmentType":"temp",
         "StartGrantValue":60,
         "StartTimeInterval":1,
         "EndGrantValue":60,
         "EndTimeInterval":1
      },
      "Reason":null
   }
}

Example Response:

{
    "success": true,
    "Result": "5ba87....",
    "Message": null,
    "MessageID": null,
    "Exception": null,
    "ErrorID": null,
    "ErrorCode": null,
    "InnerExceptions": null
}