Click or drag to resize

IJsonpWsEndUserSetRenameSharedStorage Method

By the method SetRenameSharedStorage you can change the name of a network storage

Namespace:  Aruba.Cloud.WsEndUser
Assembly:  Aruba.Cloud.WsEndUser (in Aruba.Cloud.WsEndUser.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
[OperationContractAttribute]
[WebGetAttribute(ResponseFormat = WebMessageFormat.Json, UriTemplate = "SetRenameSharedStorage/{jsonp}/{userName}/{token}?sharedStorageID={sharedStorageID}&sharedStorageName={sharedStorageName}")]
Stream SetRenameSharedStorage(
	string jsonp,
	string userName,
	string token,
	string sharedStorageID,
	string sharedStorageName
)

Parameters

jsonp
Type: SystemString
userName
Type: SystemString
token
Type: SystemString
sharedStorageID
Type: SystemString
sharedStorageName
Type: SystemString

Return Value

Type: Stream
Examples
        /// IWsEndUser.SetRenameSharedStorage Method (c# .NET)
public static string SetRenameSharedStorage(WsEndUserClient client,
    int storageId, String storageName)
{
    //specify the account login details 
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "0123456789";

    StringBuilder stringBuilder = new StringBuilder();

    try
    {
        // create the object RenameSharedStorageRequest  for the request 
        // with data to process
        RenameSharedStorageRequest request = 
            new RenameSharedStorageRequest();
        request.SharedStorageID = storageId;
        request.SharedStorageName = storageName;

        // call method SetRenameSharedStorage 
        // obtaining a WsResult item
        WsResult result = client.SetRenameSharedStorage(request);

        //if the call is Success print history values
        if (result.Success)
        {
            // get Value returned from server
            stringBuilder.Append(" Operation successfully. Result Code : ");
            stringBuilder.Append(result.ResultCode);
        }
        else
        {
            throw new ApplicationException(result.ResultMessage);
        }
    }
    catch (Exception ex)
    {
        // re-run the error
        throw new ApplicationException(ex.Message);
    }

    return stringBuilder.ToString();
}
See Also