{-# 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.InstanceTemplates.GetIAMPolicy
(
InstanceTemplatesGetIAMPolicyResource
, instanceTemplatesGetIAMPolicy
, InstanceTemplatesGetIAMPolicy
, itgipProject
, itgipResource
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InstanceTemplatesGetIAMPolicyResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"instanceTemplates" :>
Capture "resource" Text :>
"getIamPolicy" :>
QueryParam "alt" AltJSON :> Get '[JSON] Policy
data InstanceTemplatesGetIAMPolicy = InstanceTemplatesGetIAMPolicy'
{ _itgipProject :: !Text
, _itgipResource :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instanceTemplatesGetIAMPolicy
:: Text
-> Text
-> InstanceTemplatesGetIAMPolicy
instanceTemplatesGetIAMPolicy pItgipProject_ pItgipResource_ =
InstanceTemplatesGetIAMPolicy'
{ _itgipProject = pItgipProject_
, _itgipResource = pItgipResource_
}
itgipProject :: Lens' InstanceTemplatesGetIAMPolicy Text
itgipProject
= lens _itgipProject (\ s a -> s{_itgipProject = a})
itgipResource :: Lens' InstanceTemplatesGetIAMPolicy Text
itgipResource
= lens _itgipResource
(\ s a -> s{_itgipResource = a})
instance GoogleRequest InstanceTemplatesGetIAMPolicy
where
type Rs InstanceTemplatesGetIAMPolicy = Policy
type Scopes InstanceTemplatesGetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient InstanceTemplatesGetIAMPolicy'{..}
= go _itgipProject _itgipResource (Just AltJSON)
computeService
where go
= buildClient
(Proxy ::
Proxy InstanceTemplatesGetIAMPolicyResource)
mempty