{-# 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.Disks.GetIAMPolicy
(
DisksGetIAMPolicyResource
, disksGetIAMPolicy
, DisksGetIAMPolicy
, dgipProject
, dgipZone
, dgipResource
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type DisksGetIAMPolicyResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"disks" :>
Capture "resource" Text :>
"getIamPolicy" :>
QueryParam "alt" AltJSON :> Get '[JSON] Policy
data DisksGetIAMPolicy = DisksGetIAMPolicy'
{ _dgipProject :: !Text
, _dgipZone :: !Text
, _dgipResource :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
disksGetIAMPolicy
:: Text
-> Text
-> Text
-> DisksGetIAMPolicy
disksGetIAMPolicy pDgipProject_ pDgipZone_ pDgipResource_ =
DisksGetIAMPolicy'
{ _dgipProject = pDgipProject_
, _dgipZone = pDgipZone_
, _dgipResource = pDgipResource_
}
dgipProject :: Lens' DisksGetIAMPolicy Text
dgipProject
= lens _dgipProject (\ s a -> s{_dgipProject = a})
dgipZone :: Lens' DisksGetIAMPolicy Text
dgipZone = lens _dgipZone (\ s a -> s{_dgipZone = a})
dgipResource :: Lens' DisksGetIAMPolicy Text
dgipResource
= lens _dgipResource (\ s a -> s{_dgipResource = a})
instance GoogleRequest DisksGetIAMPolicy where
type Rs DisksGetIAMPolicy = Policy
type Scopes DisksGetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient DisksGetIAMPolicy'{..}
= go _dgipProject _dgipZone _dgipResource
(Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy DisksGetIAMPolicyResource)
mempty