{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.Compute.TargetPools.GetHealth
(
TargetPoolsGetHealthResource
, targetPoolsGetHealth
, TargetPoolsGetHealth
, tpghProject
, tpghTargetPool
, tpghPayload
, tpghRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type TargetPoolsGetHealthResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"targetPools" :>
Capture "targetPool" Text :>
"getHealth" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] InstanceReference :>
Post '[JSON] TargetPoolInstanceHealth
data TargetPoolsGetHealth = TargetPoolsGetHealth'
{ _tpghProject :: !Text
, _tpghTargetPool :: !Text
, _tpghPayload :: !InstanceReference
, _tpghRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
targetPoolsGetHealth
:: Text
-> Text
-> InstanceReference
-> Text
-> TargetPoolsGetHealth
targetPoolsGetHealth pTpghProject_ pTpghTargetPool_ pTpghPayload_ pTpghRegion_ =
TargetPoolsGetHealth'
{ _tpghProject = pTpghProject_
, _tpghTargetPool = pTpghTargetPool_
, _tpghPayload = pTpghPayload_
, _tpghRegion = pTpghRegion_
}
tpghProject :: Lens' TargetPoolsGetHealth Text
tpghProject
= lens _tpghProject (\ s a -> s{_tpghProject = a})
tpghTargetPool :: Lens' TargetPoolsGetHealth Text
tpghTargetPool
= lens _tpghTargetPool
(\ s a -> s{_tpghTargetPool = a})
tpghPayload :: Lens' TargetPoolsGetHealth InstanceReference
tpghPayload
= lens _tpghPayload (\ s a -> s{_tpghPayload = a})
tpghRegion :: Lens' TargetPoolsGetHealth Text
tpghRegion
= lens _tpghRegion (\ s a -> s{_tpghRegion = a})
instance GoogleRequest TargetPoolsGetHealth where
type Rs TargetPoolsGetHealth =
TargetPoolInstanceHealth
type Scopes TargetPoolsGetHealth =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient TargetPoolsGetHealth'{..}
= go _tpghProject _tpghRegion _tpghTargetPool
(Just AltJSON)
_tpghPayload
computeService
where go
= buildClient
(Proxy :: Proxy TargetPoolsGetHealthResource)
mempty