From da6f48bd5cd3791c57a72d0c6c6a1b9be22f9a6e Mon Sep 17 00:00:00 2001 From: Marco Zocca Date: Mon, 30 Oct 2023 22:59:14 +0100 Subject: [PATCH] saving --- ms-azure-api/src/MSAzureAPI/CostManagement.hs | 7 +++++++ ms-azure-api/src/MSAzureAPI/Internal/Common.hs | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ms-azure-api/src/MSAzureAPI/CostManagement.hs b/ms-azure-api/src/MSAzureAPI/CostManagement.hs index dba68e9..205977e 100644 --- a/ms-azure-api/src/MSAzureAPI/CostManagement.hs +++ b/ms-azure-api/src/MSAzureAPI/CostManagement.hs @@ -45,6 +45,13 @@ generateCostDetailsReport rid = MSA.post MSA.APManagement [ , "generateCostDetailsReport" ] ("api-version" MSA.==: "2023-08-01") +data CDRQueryResult = CDRQResult { + cdrqrLocation :: Text + } deriving (Show, Generic) +instance A.FromJSON CDRQueryResult where + parseJSON = A.genericParseJSON (MSA.aesonOptions "cdrqr") + + data CDROptions = CDROptions { cdrTimePeriod :: CDRTimePeriod } deriving (Show, Generic) diff --git a/ms-azure-api/src/MSAzureAPI/Internal/Common.hs b/ms-azure-api/src/MSAzureAPI/Internal/Common.hs index e911a48..43fce03 100644 --- a/ms-azure-api/src/MSAzureAPI/Internal/Common.hs +++ b/ms-azure-api/src/MSAzureAPI/Internal/Common.hs @@ -64,7 +64,7 @@ import Text.URI (URI, mkURI) -- ms-auth import MSAuth (OAuth2Token(..), AccessToken(..), ExchangeToken(..), RefreshToken(..), OAuth2Error, IdToken(..)) -- req -import Network.HTTP.Req (Req, runReq, HttpBody(..), HttpConfig(..), HttpException(..), defaultHttpConfig, req, Option, (=:), GET(..), POST(..), PUT(..), DELETE(..), Url, Scheme(..), urlQ, useHttpsURI, https, (/:), ReqBodyJson(..), NoReqBody(..), oAuth2Bearer, HttpResponse(..), jsonResponse, JsonResponse, lbsResponse, LbsResponse, bsResponse, BsResponse, responseBody) +import Network.HTTP.Req (Req, runReq, HttpBody(..), HttpConfig(..), HttpException(..), defaultHttpConfig, req, Option, (=:), GET(..), POST(..), PUT(..), DELETE(..), Url, Scheme(..), urlQ, useHttpsURI, https, (/:), ReqBodyJson(..), NoReqBody(..), oAuth2Bearer, HttpResponse(..), jsonResponse, JsonResponse, lbsResponse, LbsResponse, bsResponse, BsResponse, responseBody, responseHeader) -- text import Data.Text (Text, pack, unpack) -- unliftio