module Network.AWS.CloudSearch.DescribeServiceAccessPolicies
(
describeServiceAccessPolicies
, DescribeServiceAccessPolicies
, dsapDeployed
, dsapDomainName
, describeServiceAccessPoliciesResponse
, DescribeServiceAccessPoliciesResponse
, dsaprsStatus
, dsaprsAccessPolicies
) 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 DescribeServiceAccessPolicies = DescribeServiceAccessPolicies'
{ _dsapDeployed :: !(Maybe Bool)
, _dsapDomainName :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeServiceAccessPolicies
:: Text
-> DescribeServiceAccessPolicies
describeServiceAccessPolicies pDomainName_ =
DescribeServiceAccessPolicies'
{ _dsapDeployed = Nothing
, _dsapDomainName = pDomainName_
}
dsapDeployed :: Lens' DescribeServiceAccessPolicies (Maybe Bool)
dsapDeployed = lens _dsapDeployed (\ s a -> s{_dsapDeployed = a});
dsapDomainName :: Lens' DescribeServiceAccessPolicies Text
dsapDomainName = lens _dsapDomainName (\ s a -> s{_dsapDomainName = a});
instance AWSRequest DescribeServiceAccessPolicies
where
type Sv DescribeServiceAccessPolicies = CloudSearch
type Rs DescribeServiceAccessPolicies =
DescribeServiceAccessPoliciesResponse
request = postQuery
response
= receiveXMLWrapper
"DescribeServiceAccessPoliciesResult"
(\ s h x ->
DescribeServiceAccessPoliciesResponse' <$>
(pure (fromEnum s)) <*> (x .@ "AccessPolicies"))
instance ToHeaders DescribeServiceAccessPolicies
where
toHeaders = const mempty
instance ToPath DescribeServiceAccessPolicies where
toPath = const "/"
instance ToQuery DescribeServiceAccessPolicies where
toQuery DescribeServiceAccessPolicies'{..}
= mconcat
["Action" =:
("DescribeServiceAccessPolicies" :: ByteString),
"Version" =: ("2013-01-01" :: ByteString),
"Deployed" =: _dsapDeployed,
"DomainName" =: _dsapDomainName]
data DescribeServiceAccessPoliciesResponse = DescribeServiceAccessPoliciesResponse'
{ _dsaprsStatus :: !Int
, _dsaprsAccessPolicies :: !AccessPoliciesStatus
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeServiceAccessPoliciesResponse
:: Int
-> AccessPoliciesStatus
-> DescribeServiceAccessPoliciesResponse
describeServiceAccessPoliciesResponse pStatus_ pAccessPolicies_ =
DescribeServiceAccessPoliciesResponse'
{ _dsaprsStatus = pStatus_
, _dsaprsAccessPolicies = pAccessPolicies_
}
dsaprsStatus :: Lens' DescribeServiceAccessPoliciesResponse Int
dsaprsStatus = lens _dsaprsStatus (\ s a -> s{_dsaprsStatus = a});
dsaprsAccessPolicies :: Lens' DescribeServiceAccessPoliciesResponse AccessPoliciesStatus
dsaprsAccessPolicies = lens _dsaprsAccessPolicies (\ s a -> s{_dsaprsAccessPolicies = a});