module Network.AWS.CloudSearch.UpdateServiceAccessPolicies
(
updateServiceAccessPolicies
, UpdateServiceAccessPolicies
, usapDomainName
, usapAccessPolicies
, updateServiceAccessPoliciesResponse
, UpdateServiceAccessPoliciesResponse
, usaprsResponseStatus
, usaprsAccessPolicies
) where
import Network.AWS.CloudSearch.Types
import Network.AWS.CloudSearch.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data UpdateServiceAccessPolicies = UpdateServiceAccessPolicies'
{ _usapDomainName :: !Text
, _usapAccessPolicies :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateServiceAccessPolicies
:: Text
-> Text
-> UpdateServiceAccessPolicies
updateServiceAccessPolicies pDomainName_ pAccessPolicies_ =
UpdateServiceAccessPolicies'
{ _usapDomainName = pDomainName_
, _usapAccessPolicies = pAccessPolicies_
}
usapDomainName :: Lens' UpdateServiceAccessPolicies Text
usapDomainName = lens _usapDomainName (\ s a -> s{_usapDomainName = a});
usapAccessPolicies :: Lens' UpdateServiceAccessPolicies Text
usapAccessPolicies = lens _usapAccessPolicies (\ s a -> s{_usapAccessPolicies = a});
instance AWSRequest UpdateServiceAccessPolicies where
type Rs UpdateServiceAccessPolicies =
UpdateServiceAccessPoliciesResponse
request = postQuery cloudSearch
response
= receiveXMLWrapper
"UpdateServiceAccessPoliciesResult"
(\ s h x ->
UpdateServiceAccessPoliciesResponse' <$>
(pure (fromEnum s)) <*> (x .@ "AccessPolicies"))
instance ToHeaders UpdateServiceAccessPolicies where
toHeaders = const mempty
instance ToPath UpdateServiceAccessPolicies where
toPath = const "/"
instance ToQuery UpdateServiceAccessPolicies where
toQuery UpdateServiceAccessPolicies'{..}
= mconcat
["Action" =:
("UpdateServiceAccessPolicies" :: ByteString),
"Version" =: ("2013-01-01" :: ByteString),
"DomainName" =: _usapDomainName,
"AccessPolicies" =: _usapAccessPolicies]
data UpdateServiceAccessPoliciesResponse = UpdateServiceAccessPoliciesResponse'
{ _usaprsResponseStatus :: !Int
, _usaprsAccessPolicies :: !AccessPoliciesStatus
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateServiceAccessPoliciesResponse
:: Int
-> AccessPoliciesStatus
-> UpdateServiceAccessPoliciesResponse
updateServiceAccessPoliciesResponse pResponseStatus_ pAccessPolicies_ =
UpdateServiceAccessPoliciesResponse'
{ _usaprsResponseStatus = pResponseStatus_
, _usaprsAccessPolicies = pAccessPolicies_
}
usaprsResponseStatus :: Lens' UpdateServiceAccessPoliciesResponse Int
usaprsResponseStatus = lens _usaprsResponseStatus (\ s a -> s{_usaprsResponseStatus = a});
usaprsAccessPolicies :: Lens' UpdateServiceAccessPoliciesResponse AccessPoliciesStatus
usaprsAccessPolicies = lens _usaprsAccessPolicies (\ s a -> s{_usaprsAccessPolicies = a});