AzureML.ManagementSDK.RefreshWebServiceEndPoint C# (CSharp) Method

RefreshWebServiceEndPoint() public method

public RefreshWebServiceEndPoint ( WorkspaceSetting setting, string webServiceId, string endpointName, bool overwriteResources ) : bool
setting AzureML.Contract.WorkspaceSetting
webServiceId string
endpointName string
overwriteResources bool
return bool
        public bool RefreshWebServiceEndPoint(WorkspaceSetting setting, string webServiceId, string endpointName, bool overwriteResources)
        {
            ValidateWorkspaceSetting(setting);
            Util.AuthorizationToken = setting.AuthorizationToken;
            string query = WebServiceApi + string.Format("workspaces/{0}/webservices/{1}/endpoints/{2}/refresh", setting.WorkspaceId, webServiceId, endpointName);
            string body = "{\"OverwriteResources\": \"" + overwriteResources.ToString() + "\"}";
            HttpResult hr = Util.HttpPost(query, body).Result;
            if (hr.StatusCode == 304) // no change detected so no update happened.
                return false;
            if (!hr.IsSuccess)
                throw new AmlRestApiException(hr);
            return true;
        }