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