{-# 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.NodeTemplates.GetIAMPolicy
(
NodeTemplatesGetIAMPolicyResource
, nodeTemplatesGetIAMPolicy
, NodeTemplatesGetIAMPolicy
, ntgipProject
, ntgipResource
, ntgipRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type NodeTemplatesGetIAMPolicyResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"nodeTemplates" :>
Capture "resource" Text :>
"getIamPolicy" :>
QueryParam "alt" AltJSON :> Get '[JSON] Policy
data NodeTemplatesGetIAMPolicy = NodeTemplatesGetIAMPolicy'
{ _ntgipProject :: !Text
, _ntgipResource :: !Text
, _ntgipRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
nodeTemplatesGetIAMPolicy
:: Text
-> Text
-> Text
-> NodeTemplatesGetIAMPolicy
nodeTemplatesGetIAMPolicy pNtgipProject_ pNtgipResource_ pNtgipRegion_ =
NodeTemplatesGetIAMPolicy'
{ _ntgipProject = pNtgipProject_
, _ntgipResource = pNtgipResource_
, _ntgipRegion = pNtgipRegion_
}
ntgipProject :: Lens' NodeTemplatesGetIAMPolicy Text
ntgipProject
= lens _ntgipProject (\ s a -> s{_ntgipProject = a})
ntgipResource :: Lens' NodeTemplatesGetIAMPolicy Text
ntgipResource
= lens _ntgipResource
(\ s a -> s{_ntgipResource = a})
ntgipRegion :: Lens' NodeTemplatesGetIAMPolicy Text
ntgipRegion
= lens _ntgipRegion (\ s a -> s{_ntgipRegion = a})
instance GoogleRequest NodeTemplatesGetIAMPolicy
where
type Rs NodeTemplatesGetIAMPolicy = Policy
type Scopes NodeTemplatesGetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient NodeTemplatesGetIAMPolicy'{..}
= go _ntgipProject _ntgipRegion _ntgipResource
(Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy NodeTemplatesGetIAMPolicyResource)
mempty