{-# 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.Images.GetIAMPolicy
(
ImagesGetIAMPolicyResource
, imagesGetIAMPolicy
, ImagesGetIAMPolicy
, igipProject
, igipResource
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type ImagesGetIAMPolicyResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"images" :>
Capture "resource" Text :>
"getIamPolicy" :>
QueryParam "alt" AltJSON :> Get '[JSON] Policy
data ImagesGetIAMPolicy = ImagesGetIAMPolicy'
{ _igipProject :: !Text
, _igipResource :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
imagesGetIAMPolicy
:: Text
-> Text
-> ImagesGetIAMPolicy
imagesGetIAMPolicy pIgipProject_ pIgipResource_ =
ImagesGetIAMPolicy'
{ _igipProject = pIgipProject_
, _igipResource = pIgipResource_
}
igipProject :: Lens' ImagesGetIAMPolicy Text
igipProject
= lens _igipProject (\ s a -> s{_igipProject = a})
igipResource :: Lens' ImagesGetIAMPolicy Text
igipResource
= lens _igipResource (\ s a -> s{_igipResource = a})
instance GoogleRequest ImagesGetIAMPolicy where
type Rs ImagesGetIAMPolicy = Policy
type Scopes ImagesGetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient ImagesGetIAMPolicy'{..}
= go _igipProject _igipResource (Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy ImagesGetIAMPolicyResource)
mempty