{-# 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.SetIAMPolicy
(
DeploymentsSetIAMPolicyResource
, deploymentsSetIAMPolicy
, DeploymentsSetIAMPolicy
, dsipProject
, dsipPayload
, dsipResource
) where
import Network.Google.DeploymentManager.Types
import Network.Google.Prelude
type DeploymentsSetIAMPolicyResource =
"deploymentmanager" :>
"v2" :>
"projects" :>
Capture "project" Text :>
"global" :>
"deployments" :>
Capture "resource" Text :>
"setIamPolicy" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GlobalSetPolicyRequest :>
Post '[JSON] Policy
data DeploymentsSetIAMPolicy = DeploymentsSetIAMPolicy'
{ _dsipProject :: !Text
, _dsipPayload :: !GlobalSetPolicyRequest
, _dsipResource :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
deploymentsSetIAMPolicy
:: Text
-> GlobalSetPolicyRequest
-> Text
-> DeploymentsSetIAMPolicy
deploymentsSetIAMPolicy pDsipProject_ pDsipPayload_ pDsipResource_ =
DeploymentsSetIAMPolicy'
{ _dsipProject = pDsipProject_
, _dsipPayload = pDsipPayload_
, _dsipResource = pDsipResource_
}
dsipProject :: Lens' DeploymentsSetIAMPolicy Text
dsipProject
= lens _dsipProject (\ s a -> s{_dsipProject = a})
dsipPayload :: Lens' DeploymentsSetIAMPolicy GlobalSetPolicyRequest
dsipPayload
= lens _dsipPayload (\ s a -> s{_dsipPayload = a})
dsipResource :: Lens' DeploymentsSetIAMPolicy Text
dsipResource
= lens _dsipResource (\ s a -> s{_dsipResource = a})
instance GoogleRequest DeploymentsSetIAMPolicy where
type Rs DeploymentsSetIAMPolicy = Policy
type Scopes DeploymentsSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/ndev.cloudman"]
requestClient DeploymentsSetIAMPolicy'{..}
= go _dsipProject _dsipResource (Just AltJSON)
_dsipPayload
deploymentManagerService
where go
= buildClient
(Proxy :: Proxy DeploymentsSetIAMPolicyResource)
mempty