createObject


SoftLayer_User_Permission_Role::createObject

Create a new customer permission role

Description

Customer created permission roles must set the systemFlag attribute to false. The SYSTEM type is reserved for internal use. The account id supplied in the template permission group must match account id of the user who is creating the permission group. The user who is creating the permission group must have the permission to manage users.

Parameters

Name Type Description
templateObject SoftLayer_User_Permission_Role The SoftLayer_User_Permission_Role object that you wish to create.

Required Headers

Optional Headers

Return Values

Error Handling

  • Throws the exception “You cannot create role: Permission Denied.” if a customer user attempts to create a permission role without the proper permission.
  • Throws the exception “You cannot create system role” if a customer user attempts to create a SYSTEM permission role.
  • Throws the exception “You cannot create Roles on other accounts.” if a customer user attempts to create a permission role on an account other than their own.
curl -g -u $SL_USER:$SL_APIKEY -X POST -d '{"parameters": [SoftLayer_User_Permission_Role]}' \
'https://api.softlayer.com/rest/v3.1/SoftLayer_User_Permission_Role/createObject'