addResourceObject


SoftLayer_User_Permission_Group::addResourceObject

Links a hardware, virtual guest, or dedicated host object on the

Description

Links a SoftLayer_Hardware_Server, SoftLayer_Virtual_Guest, or SoftLayer_Virtual_DedicatedHost object to the group.

Parameters

Name Type Description
resourceObject SoftLayer_Entity The object of the resource record (typically hardware, virtual guest, or dedicated host) to add to this group. See SoftLayer_User_Permission_Resource_Type for the valid entities for this request.
resourceTypeKeyName string An optional keyname for the type of resource provided. See SoftLayer_User_Permission_Resource_Type for the valid entities for this request.

Required Headers

Optional Headers

  • None

Return Values

  • boolean

Error Handling

  • Throws the exception “Can’t add resource object to group: Permission Denied.” if a customer user attempts this request without the proper permission.
  • Throws the exception “A permission resource type does not exist for” if one of the object is not one of the valid resource types.
  • Throws the exception “Resource object id is invalid” if the provided resource object does not contain an id.

Associated Methods

curl -g -u $SL_USER:$SL_APIKEY -X POST -d '{"parameters": [SoftLayer_Entity, string]}' \
'https://api.softlayer.com/rest/v3.1/SoftLayer_User_Permission_Group/{SoftLayer_User_Permission_GroupID}/addResourceObject'