addVirtualGuestAccess


SoftLayer_User_Customer_OpenIdConnect::addVirtualGuestAccess

Add a CloudLayer Computing Instance to a portal user’s access list.

Description

Add a CloudLayer Computing Instance to a portal user’s access list. A user’s CloudLayer Computing Instance access list controls which of an account’s CloudLayer Computing Instance objects a user has access to in the SoftLayer customer portal and API. CloudLayer Computing Instances do not exist in the SoftLayer portal and returns “not found” exceptions in the API if the user doesn’t have access to it. If a user already has access to the CloudLayer Computing Instance you’re attempting to add then addVirtualGuestAccess() returns true.

Users can assign CloudLayer Computing Instance access to their child users, but not to themselves. An account’s master has access to all CloudLayer Computing Instances on their customer account and can set CloudLayer Computing Instance access for any of the other users on their account.

Only the USER_MANAGE permission is required to execute this.


Parameters

Name Type Description
virtualGuestId int The identifier of the Virtual Server to add to a user’s access list.

Required Headers

Optional Headers

  • None

Return Values

  • boolean

Error Handling

  • Throws the exception “You may not grant or deny Master User device access.” when trying to add virtual guest access to a master user.
  • Throws the exception “You may not grant or deny yourself device access.” when trying to add virtual guest access to the user making the call to the SoftLayer API.
  • Throws the exception “You may not grant or deny device access to other users.” when trying to add virtual guest access the user making the API call is not their account’s master user or does not have the “USER_MANAGE” portal permission.
  • Throws the exception “You may not add Virtual Server permissions that the parent does not possess to this account.” when trying to add Virtual Server access to the user and the parent user does not possess that access to that Virtual Server.
  • Throws the exception “Please specify a valid Virtual Server id.” if the given Virtual Server id is not a valid id.
  • Throws the exception “Unable to add user Virtual Server access.” if the API was unable to assign Virtual Server access to the given portal user.

Associated Methods

curl -g -u $SL_USER:$SL_APIKEY -X POST -d '{"parameters": [int]}' \
'https://api.softlayer.com/rest/v3.1/SoftLayer_User_Customer_OpenIdConnect/{SoftLayer_User_Customer_OpenIdConnectID}/addVirtualGuestAccess'