AzureML.ManagementSDK.UnpackExperiment C# (CSharp) Method

UnpackExperiment() public method

public UnpackExperiment ( WorkspaceSetting setting, string packedLocation, string sourceRegion ) : PackingServiceActivity
setting AzureML.Contract.WorkspaceSetting
packedLocation string
sourceRegion string
return AzureML.Contract.PackingServiceActivity
        public PackingServiceActivity UnpackExperiment(WorkspaceSetting setting, string packedLocation, string sourceRegion)
        {
            ValidateWorkspaceSetting(setting);
            Util.AuthorizationToken = setting.AuthorizationToken;
            string queryUrl = StudioApi + string.Format("workspaces/{0}/packages?api-version=2.0&packageUri={1}{2}", setting.WorkspaceId, HttpUtility.UrlEncode(packedLocation), "&region=" + sourceRegion.Replace(" ", string.Empty));
            //Console.WriteLine("Unpacking: PUT " + queryUrl);
            HttpResult hr = Util.HttpPut(queryUrl, string.Empty).Result;
            if (hr.IsSuccess)
            {                
                PackingServiceActivity activity = jss.Deserialize<PackingServiceActivity>(hr.Payload);
                return activity;
            }
            throw new AmlRestApiException(hr);
        }