-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Marco Zocca
committed
Jun 24, 2023
1 parent
8cb7435
commit 1245d5e
Showing
5 changed files
with
105 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
module MSAzureAPI.MachineLearning.Jobs where | ||
|
||
import Control.Applicative (Alternative(..)) | ||
import Control.Monad.IO.Class (MonadIO(..)) | ||
import Data.Foldable (asum) | ||
import Data.Functor (void) | ||
import Data.Maybe (listToMaybe) | ||
import qualified Text.ParserCombinators.ReadP as RP (ReadP, readP_to_S, choice, many, between, char, string, satisfy) | ||
|
||
-- bytestring | ||
import qualified Data.ByteString as BS (ByteString) | ||
import qualified Data.ByteString.Char8 as BS8 (pack, unpack) | ||
import qualified Data.ByteString.Lazy as LBS (ByteString) | ||
-- hoauth2 | ||
-- import Network.OAuth.OAuth2 (OAuth2Token(..)) | ||
import Network.OAuth.OAuth2.Internal (AccessToken(..)) | ||
-- req | ||
import Network.HTTP.Req (Req, Url, Option, Scheme(..), header, (=:)) | ||
-- text | ||
import Data.Text (Text, pack, unpack) | ||
import qualified Data.Text.Lazy as TL (Text, pack, unpack, toStrict) | ||
-- time | ||
import Data.Time (UTCTime, getCurrentTime) | ||
import Data.Time.Format (FormatTime, formatTime, defaultTimeLocale) | ||
import Data.Time.LocalTime (getZonedTime) | ||
-- xeno | ||
import qualified Xeno.DOM.Robust as X (Node, Content(..), name, contents, children) | ||
-- xmlbf-xeno | ||
import qualified Xmlbf.Xeno as XB (fromRawXml) | ||
-- xmlbf | ||
import qualified Xmlbf as XB (Parser, runParser, pElement, pText) | ||
|
||
import MSAzureAPI.Internal.Common (APIPlane(..), (==:), put, get, getBs, post, getLbs) | ||
|
||
|
||
-- | create a job | ||
-- | ||
-- docs: <https://learn.microsoft.com/en-us/rest/api/azureml/2023-04-01/jobs/create-or-update?tabs=HTTP> | ||
-- | ||
-- @PUT https:\/\/management.azure.com\/subscriptions\/{subscriptionId}\/resourceGroups\/{resourceGroupName}\/providers\/Microsoft.MachineLearningServices\/workspaces\/{workspaceName}\/jobs\/{id}?api-version=2023-04-01@ | ||
|
||
createJob sid rgid wsid jid = | ||
put APManagement ["subscriptions", sid, | ||
"resourceGroups", rgid, | ||
"providers", "Microsoft.MachineLearningServices", | ||
"workspaces", wsid, | ||
"jobs", jid] ("api-version" ==: "2023-04-01") | ||
|
||
data JobBase = JB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
-- | Storage Services API: https://learn.microsoft.com/en-us/rest/api/storageservices/ | ||
-- | ||
-- | ||
-- Permissions that an Azure AD entity (user or service principal) needs to perform file service operations: | ||
-- | ||
-- <https://learn.microsoft.com/en-us/rest/api/storageservices/authorize-with-azure-active-directory#permissions-for-calling-data-operations> | ||
module MSAzureAPI.StorageServices where | ||
|
||
{- Permissions that an Azure AD entity (user or service principal) needs to perform file service operations: | ||
https://learn.microsoft.com/en-us/rest/api/storageservices/authorize-with-azure-active-directory#permissions-for-calling-data-operations | ||
-} | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters