{-# 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.NodeGroups.GetIAMPolicy
(
NodeGroupsGetIAMPolicyResource
, nodeGroupsGetIAMPolicy
, NodeGroupsGetIAMPolicy
, nggipProject
, nggipZone
, nggipResource
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type NodeGroupsGetIAMPolicyResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"nodeGroups" :>
Capture "resource" Text :>
"getIamPolicy" :>
QueryParam "alt" AltJSON :> Get '[JSON] Policy
data NodeGroupsGetIAMPolicy = NodeGroupsGetIAMPolicy'
{ _nggipProject :: !Text
, _nggipZone :: !Text
, _nggipResource :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
nodeGroupsGetIAMPolicy
:: Text
-> Text
-> Text
-> NodeGroupsGetIAMPolicy
nodeGroupsGetIAMPolicy pNggipProject_ pNggipZone_ pNggipResource_ =
NodeGroupsGetIAMPolicy'
{ _nggipProject = pNggipProject_
, _nggipZone = pNggipZone_
, _nggipResource = pNggipResource_
}
nggipProject :: Lens' NodeGroupsGetIAMPolicy Text
nggipProject
= lens _nggipProject (\ s a -> s{_nggipProject = a})
nggipZone :: Lens' NodeGroupsGetIAMPolicy Text
nggipZone
= lens _nggipZone (\ s a -> s{_nggipZone = a})
nggipResource :: Lens' NodeGroupsGetIAMPolicy Text
nggipResource
= lens _nggipResource
(\ s a -> s{_nggipResource = a})
instance GoogleRequest NodeGroupsGetIAMPolicy where
type Rs NodeGroupsGetIAMPolicy = Policy
type Scopes NodeGroupsGetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient NodeGroupsGetIAMPolicy'{..}
= go _nggipProject _nggipZone _nggipResource
(Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy NodeGroupsGetIAMPolicyResource)
mempty