{-# 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.DeploymentManager.Deployments.GetIAMPolicy
(
DeploymentsGetIAMPolicyResource
, deploymentsGetIAMPolicy
, DeploymentsGetIAMPolicy
, dgipProject
, dgipResource
) where
import Network.Google.DeploymentManager.Types
import Network.Google.Prelude
type DeploymentsGetIAMPolicyResource =
"deploymentmanager" :>
"v2" :>
"projects" :>
Capture "project" Text :>
"global" :>
"deployments" :>
Capture "resource" Text :>
"getIamPolicy" :>
QueryParam "alt" AltJSON :> Get '[JSON] Policy
data DeploymentsGetIAMPolicy = DeploymentsGetIAMPolicy'
{ _dgipProject :: !Text
, _dgipResource :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
deploymentsGetIAMPolicy
:: Text
-> Text
-> DeploymentsGetIAMPolicy
deploymentsGetIAMPolicy pDgipProject_ pDgipResource_ =
DeploymentsGetIAMPolicy'
{ _dgipProject = pDgipProject_
, _dgipResource = pDgipResource_
}
dgipProject :: Lens' DeploymentsGetIAMPolicy Text
dgipProject
= lens _dgipProject (\ s a -> s{_dgipProject = a})
dgipResource :: Lens' DeploymentsGetIAMPolicy Text
dgipResource
= lens _dgipResource (\ s a -> s{_dgipResource = a})
instance GoogleRequest DeploymentsGetIAMPolicy where
type Rs DeploymentsGetIAMPolicy = Policy
type Scopes DeploymentsGetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/ndev.cloudman"]
requestClient DeploymentsGetIAMPolicy'{..}
= go _dgipProject _dgipResource (Just AltJSON)
deploymentManagerService
where go
= buildClient
(Proxy :: Proxy DeploymentsGetIAMPolicyResource)
mempty