Skip to content

Commit

Permalink
Regenerating amazonka-config from latest service definition
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanhay committed Feb 2, 2017
1 parent 9725dd6 commit 7f2d8d1
Show file tree
Hide file tree
Showing 14 changed files with 195 additions and 60 deletions.
18 changes: 9 additions & 9 deletions amazonka-config/gen/Network/AWS/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,16 @@ module Network.AWS.Config
-- * Operations
-- $operations

-- ** GetResourceConfigHistory
-- ** GetResourceConfigHistory (Paginated)
, module Network.AWS.Config.GetResourceConfigHistory

-- ** DescribeComplianceByConfigRule
-- ** DescribeComplianceByConfigRule (Paginated)
, module Network.AWS.Config.DescribeComplianceByConfigRule

-- ** StopConfigurationRecorder
, module Network.AWS.Config.StopConfigurationRecorder

-- ** DescribeConfigRules
-- ** DescribeConfigRules (Paginated)
, module Network.AWS.Config.DescribeConfigRules

-- ** DeleteEvaluationResults
Expand All @@ -142,7 +142,7 @@ module Network.AWS.Config
-- ** DeleteConfigRule
, module Network.AWS.Config.DeleteConfigRule

-- ** GetComplianceDetailsByResource
-- ** GetComplianceDetailsByResource (Paginated)
, module Network.AWS.Config.GetComplianceDetailsByResource

-- ** DeliverConfigSnapshot
Expand All @@ -154,7 +154,7 @@ module Network.AWS.Config
-- ** StartConfigRulesEvaluation
, module Network.AWS.Config.StartConfigRulesEvaluation

-- ** DescribeComplianceByResource
-- ** DescribeComplianceByResource (Paginated)
, module Network.AWS.Config.DescribeComplianceByResource

-- ** PutEvaluations
Expand Down Expand Up @@ -187,13 +187,13 @@ module Network.AWS.Config
-- ** PutDeliveryChannel
, module Network.AWS.Config.PutDeliveryChannel

-- ** GetComplianceDetailsByConfigRule
-- ** GetComplianceDetailsByConfigRule (Paginated)
, module Network.AWS.Config.GetComplianceDetailsByConfigRule

-- ** DeleteDeliveryChannel
, module Network.AWS.Config.DeleteDeliveryChannel

-- ** ListDiscoveredResources
-- ** ListDiscoveredResources (Paginated)
, module Network.AWS.Config.ListDiscoveredResources

-- ** DescribeDeliveryChannels
Expand Down Expand Up @@ -447,9 +447,9 @@ module Network.AWS.Config
-- ** Source
, Source
, source
, sSourceIdentifier
, sOwner
, sSourceDetails
, sOwner
, sSourceIdentifier

-- ** SourceDetail
, SourceDetail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
--
--
--
--
-- This operation returns paginated results.
module Network.AWS.Config.DescribeComplianceByConfigRule
(
-- * Creating a Request
Expand All @@ -55,6 +57,7 @@ module Network.AWS.Config.DescribeComplianceByConfigRule
import Network.AWS.Config.Types
import Network.AWS.Config.Types.Product
import Network.AWS.Lens
import Network.AWS.Pager
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
Expand All @@ -78,7 +81,7 @@ data DescribeComplianceByConfigRule = DescribeComplianceByConfigRule'
--
-- * 'dcbcrComplianceTypes' - Filters the results by compliance. The allowed values are @COMPLIANT@ , @NON_COMPLIANT@ , and @INSUFFICIENT_DATA@ .
--
-- * 'dcbcrNextToken' - The @nextToken@ string returned on a previous page that you use to get the next page of results in a paginated response.
-- * 'dcbcrNextToken' - The @NextToken@ string returned on a previous page that you use to get the next page of results in a paginated response.
describeComplianceByConfigRule
:: DescribeComplianceByConfigRule
describeComplianceByConfigRule =
Expand All @@ -96,10 +99,19 @@ dcbcrConfigRuleNames = lens _dcbcrConfigRuleNames (\ s a -> s{_dcbcrConfigRuleNa
dcbcrComplianceTypes :: Lens' DescribeComplianceByConfigRule [ComplianceType]
dcbcrComplianceTypes = lens _dcbcrComplianceTypes (\ s a -> s{_dcbcrComplianceTypes = a}) . _Default . _Coerce;

-- | The @nextToken@ string returned on a previous page that you use to get the next page of results in a paginated response.
-- | The @NextToken@ string returned on a previous page that you use to get the next page of results in a paginated response.
dcbcrNextToken :: Lens' DescribeComplianceByConfigRule (Maybe Text)
dcbcrNextToken = lens _dcbcrNextToken (\ s a -> s{_dcbcrNextToken = a});

instance AWSPager DescribeComplianceByConfigRule
where
page rq rs
| stop (rs ^. dcbcrrsNextToken) = Nothing
| stop (rs ^. dcbcrrsComplianceByConfigRules) =
Nothing
| otherwise =
Just $ rq & dcbcrNextToken .~ rs ^. dcbcrrsNextToken

instance AWSRequest DescribeComplianceByConfigRule
where
type Rs DescribeComplianceByConfigRule =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
--
--
--
--
-- This operation returns paginated results.
module Network.AWS.Config.DescribeComplianceByResource
(
-- * Creating a Request
Expand All @@ -57,6 +59,7 @@ module Network.AWS.Config.DescribeComplianceByResource
import Network.AWS.Config.Types
import Network.AWS.Config.Types.Product
import Network.AWS.Lens
import Network.AWS.Pager
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
Expand Down Expand Up @@ -84,7 +87,7 @@ data DescribeComplianceByResource = DescribeComplianceByResource'
--
-- * 'dcbrComplianceTypes' - Filters the results by compliance. The allowed values are @COMPLIANT@ , @NON_COMPLIANT@ , and @INSUFFICIENT_DATA@ .
--
-- * 'dcbrNextToken' - The @nextToken@ string returned on a previous page that you use to get the next page of results in a paginated response.
-- * 'dcbrNextToken' - The @NextToken@ string returned on a previous page that you use to get the next page of results in a paginated response.
--
-- * 'dcbrLimit' - The maximum number of evaluation results returned on each page. The default is 10. You cannot specify a limit greater than 100. If you specify 0, AWS Config uses the default.
describeComplianceByResource
Expand All @@ -110,14 +113,21 @@ dcbrResourceType = lens _dcbrResourceType (\ s a -> s{_dcbrResourceType = a});
dcbrComplianceTypes :: Lens' DescribeComplianceByResource [ComplianceType]
dcbrComplianceTypes = lens _dcbrComplianceTypes (\ s a -> s{_dcbrComplianceTypes = a}) . _Default . _Coerce;

-- | The @nextToken@ string returned on a previous page that you use to get the next page of results in a paginated response.
-- | The @NextToken@ string returned on a previous page that you use to get the next page of results in a paginated response.
dcbrNextToken :: Lens' DescribeComplianceByResource (Maybe Text)
dcbrNextToken = lens _dcbrNextToken (\ s a -> s{_dcbrNextToken = a});

-- | The maximum number of evaluation results returned on each page. The default is 10. You cannot specify a limit greater than 100. If you specify 0, AWS Config uses the default.
dcbrLimit :: Lens' DescribeComplianceByResource (Maybe Natural)
dcbrLimit = lens _dcbrLimit (\ s a -> s{_dcbrLimit = a}) . mapping _Nat;

instance AWSPager DescribeComplianceByResource where
page rq rs
| stop (rs ^. dcbrrsNextToken) = Nothing
| stop (rs ^. dcbrrsComplianceByResources) = Nothing
| otherwise =
Just $ rq & dcbrNextToken .~ rs ^. dcbrrsNextToken

instance AWSRequest DescribeComplianceByResource
where
type Rs DescribeComplianceByResource =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,15 @@ module Network.AWS.Config.DescribeConfigRuleEvaluationStatus
, DescribeConfigRuleEvaluationStatus
-- * Request Lenses
, dcresConfigRuleNames
, dcresNextToken
, dcresLimit

-- * Destructuring the Response
, describeConfigRuleEvaluationStatusResponse
, DescribeConfigRuleEvaluationStatusResponse
-- * Response Lenses
, dcresrsConfigRulesEvaluationStatus
, dcresrsNextToken
, dcresrsResponseStatus
) where

Expand All @@ -49,26 +52,42 @@ import Network.AWS.Response
--
--
-- /See:/ 'describeConfigRuleEvaluationStatus' smart constructor.
newtype DescribeConfigRuleEvaluationStatus = DescribeConfigRuleEvaluationStatus'
{ _dcresConfigRuleNames :: Maybe [Text]
data DescribeConfigRuleEvaluationStatus = DescribeConfigRuleEvaluationStatus'
{ _dcresConfigRuleNames :: !(Maybe [Text])
, _dcresNextToken :: !(Maybe Text)
, _dcresLimit :: !(Maybe Nat)
} deriving (Eq,Read,Show,Data,Typeable,Generic)

-- | Creates a value of 'DescribeConfigRuleEvaluationStatus' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dcresConfigRuleNames' - The name of the AWS managed Config rules for which you want status information. If you do not specify any names, AWS Config returns status information for all AWS managed Config rules that you use.
--
-- * 'dcresNextToken' - The @NextToken@ string returned on a previous page that you use to get the next page of results in a paginated response.
--
-- * 'dcresLimit' - The number of rule evaluation results that you want returned. This parameter is required if the rule limit for your account is more than the default of 50 rules. For more information about requesting a rule limit increase, see <http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_config AWS Config Limits> in the /AWS General Reference Guide/ .
describeConfigRuleEvaluationStatus
:: DescribeConfigRuleEvaluationStatus
describeConfigRuleEvaluationStatus =
DescribeConfigRuleEvaluationStatus'
{ _dcresConfigRuleNames = Nothing
, _dcresNextToken = Nothing
, _dcresLimit = Nothing
}

-- | The name of the AWS managed Config rules for which you want status information. If you do not specify any names, AWS Config returns status information for all AWS managed Config rules that you use.
dcresConfigRuleNames :: Lens' DescribeConfigRuleEvaluationStatus [Text]
dcresConfigRuleNames = lens _dcresConfigRuleNames (\ s a -> s{_dcresConfigRuleNames = a}) . _Default . _Coerce;

-- | The @NextToken@ string returned on a previous page that you use to get the next page of results in a paginated response.
dcresNextToken :: Lens' DescribeConfigRuleEvaluationStatus (Maybe Text)
dcresNextToken = lens _dcresNextToken (\ s a -> s{_dcresNextToken = a});

-- | The number of rule evaluation results that you want returned. This parameter is required if the rule limit for your account is more than the default of 50 rules. For more information about requesting a rule limit increase, see <http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_config AWS Config Limits> in the /AWS General Reference Guide/ .
dcresLimit :: Lens' DescribeConfigRuleEvaluationStatus (Maybe Natural)
dcresLimit = lens _dcresLimit (\ s a -> s{_dcresLimit = a}) . mapping _Nat;

instance AWSRequest
DescribeConfigRuleEvaluationStatus where
type Rs DescribeConfigRuleEvaluationStatus =
Expand All @@ -79,7 +98,8 @@ instance AWSRequest
(\ s h x ->
DescribeConfigRuleEvaluationStatusResponse' <$>
(x .?> "ConfigRulesEvaluationStatus" .!@ mempty) <*>
(pure (fromEnum s)))
(x .?> "NextToken")
<*> (pure (fromEnum s)))

instance Hashable DescribeConfigRuleEvaluationStatus

Expand All @@ -101,7 +121,9 @@ instance ToJSON DescribeConfigRuleEvaluationStatus
toJSON DescribeConfigRuleEvaluationStatus'{..}
= object
(catMaybes
[("ConfigRuleNames" .=) <$> _dcresConfigRuleNames])
[("ConfigRuleNames" .=) <$> _dcresConfigRuleNames,
("NextToken" .=) <$> _dcresNextToken,
("Limit" .=) <$> _dcresLimit])

instance ToPath DescribeConfigRuleEvaluationStatus
where
Expand All @@ -118,6 +140,7 @@ instance ToQuery DescribeConfigRuleEvaluationStatus
-- /See:/ 'describeConfigRuleEvaluationStatusResponse' smart constructor.
data DescribeConfigRuleEvaluationStatusResponse = DescribeConfigRuleEvaluationStatusResponse'
{ _dcresrsConfigRulesEvaluationStatus :: !(Maybe [ConfigRuleEvaluationStatus])
, _dcresrsNextToken :: !(Maybe Text)
, _dcresrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)

Expand All @@ -127,20 +150,27 @@ data DescribeConfigRuleEvaluationStatusResponse = DescribeConfigRuleEvaluationSt
--
-- * 'dcresrsConfigRulesEvaluationStatus' - Status information about your AWS managed Config rules.
--
-- * 'dcresrsNextToken' - The string that you use in a subsequent request to get the next page of results in a paginated response.
--
-- * 'dcresrsResponseStatus' - -- | The response status code.
describeConfigRuleEvaluationStatusResponse
:: Int -- ^ 'dcresrsResponseStatus'
-> DescribeConfigRuleEvaluationStatusResponse
describeConfigRuleEvaluationStatusResponse pResponseStatus_ =
DescribeConfigRuleEvaluationStatusResponse'
{ _dcresrsConfigRulesEvaluationStatus = Nothing
, _dcresrsNextToken = Nothing
, _dcresrsResponseStatus = pResponseStatus_
}

-- | Status information about your AWS managed Config rules.
dcresrsConfigRulesEvaluationStatus :: Lens' DescribeConfigRuleEvaluationStatusResponse [ConfigRuleEvaluationStatus]
dcresrsConfigRulesEvaluationStatus = lens _dcresrsConfigRulesEvaluationStatus (\ s a -> s{_dcresrsConfigRulesEvaluationStatus = a}) . _Default . _Coerce;

-- | The string that you use in a subsequent request to get the next page of results in a paginated response.
dcresrsNextToken :: Lens' DescribeConfigRuleEvaluationStatusResponse (Maybe Text)
dcresrsNextToken = lens _dcresrsNextToken (\ s a -> s{_dcresrsNextToken = a});

-- | -- | The response status code.
dcresrsResponseStatus :: Lens' DescribeConfigRuleEvaluationStatusResponse Int
dcresrsResponseStatus = lens _dcresrsResponseStatus (\ s a -> s{_dcresrsResponseStatus = a});
Expand Down
14 changes: 12 additions & 2 deletions amazonka-config/gen/Network/AWS/Config/DescribeConfigRules.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
-- Returns details about your AWS Config rules.
--
--
--
-- This operation returns paginated results.
module Network.AWS.Config.DescribeConfigRules
(
-- * Creating a Request
Expand All @@ -42,6 +44,7 @@ module Network.AWS.Config.DescribeConfigRules
import Network.AWS.Config.Types
import Network.AWS.Config.Types.Product
import Network.AWS.Lens
import Network.AWS.Pager
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
Expand All @@ -62,7 +65,7 @@ data DescribeConfigRules = DescribeConfigRules'
--
-- * 'dcrConfigRuleNames' - The names of the AWS Config rules for which you want details. If you do not specify any names, AWS Config returns details for all your rules.
--
-- * 'dcrNextToken' - The @nextToken@ string returned on a previous page that you use to get the next page of results in a paginated response.
-- * 'dcrNextToken' - The @NextToken@ string returned on a previous page that you use to get the next page of results in a paginated response.
describeConfigRules
:: DescribeConfigRules
describeConfigRules =
Expand All @@ -75,10 +78,17 @@ describeConfigRules =
dcrConfigRuleNames :: Lens' DescribeConfigRules [Text]
dcrConfigRuleNames = lens _dcrConfigRuleNames (\ s a -> s{_dcrConfigRuleNames = a}) . _Default . _Coerce;

-- | The @nextToken@ string returned on a previous page that you use to get the next page of results in a paginated response.
-- | The @NextToken@ string returned on a previous page that you use to get the next page of results in a paginated response.
dcrNextToken :: Lens' DescribeConfigRules (Maybe Text)
dcrNextToken = lens _dcrNextToken (\ s a -> s{_dcrNextToken = a});

instance AWSPager DescribeConfigRules where
page rq rs
| stop (rs ^. dcrrsNextToken) = Nothing
| stop (rs ^. dcrrsConfigRules) = Nothing
| otherwise =
Just $ rq & dcrNextToken .~ rs ^. dcrrsNextToken

instance AWSRequest DescribeConfigRules where
type Rs DescribeConfigRules =
DescribeConfigRulesResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
-- Returns the evaluation results for the specified AWS Config rule. The results indicate which AWS resources were evaluated by the rule, when each resource was last evaluated, and whether each resource complies with the rule.
--
--
--
-- This operation returns paginated results.
module Network.AWS.Config.GetComplianceDetailsByConfigRule
(
-- * Creating a Request
Expand All @@ -44,6 +46,7 @@ module Network.AWS.Config.GetComplianceDetailsByConfigRule
import Network.AWS.Config.Types
import Network.AWS.Config.Types.Product
import Network.AWS.Lens
import Network.AWS.Pager
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
Expand All @@ -66,7 +69,7 @@ data GetComplianceDetailsByConfigRule = GetComplianceDetailsByConfigRule'
--
-- * 'gcdbcrComplianceTypes' - Filters the results by compliance. The allowed values are @COMPLIANT@ , @NON_COMPLIANT@ , and @NOT_APPLICABLE@ .
--
-- * 'gcdbcrNextToken' - The @nextToken@ string returned on a previous page that you use to get the next page of results in a paginated response.
-- * 'gcdbcrNextToken' - The @NextToken@ string returned on a previous page that you use to get the next page of results in a paginated response.
--
-- * 'gcdbcrLimit' - The maximum number of evaluation results returned on each page. The default is 10. You cannot specify a limit greater than 100. If you specify 0, AWS Config uses the default.
--
Expand All @@ -86,7 +89,7 @@ getComplianceDetailsByConfigRule pConfigRuleName_ =
gcdbcrComplianceTypes :: Lens' GetComplianceDetailsByConfigRule [ComplianceType]
gcdbcrComplianceTypes = lens _gcdbcrComplianceTypes (\ s a -> s{_gcdbcrComplianceTypes = a}) . _Default . _Coerce;

-- | The @nextToken@ string returned on a previous page that you use to get the next page of results in a paginated response.
-- | The @NextToken@ string returned on a previous page that you use to get the next page of results in a paginated response.
gcdbcrNextToken :: Lens' GetComplianceDetailsByConfigRule (Maybe Text)
gcdbcrNextToken = lens _gcdbcrNextToken (\ s a -> s{_gcdbcrNextToken = a});

Expand All @@ -98,6 +101,15 @@ gcdbcrLimit = lens _gcdbcrLimit (\ s a -> s{_gcdbcrLimit = a}) . mapping _Nat;
gcdbcrConfigRuleName :: Lens' GetComplianceDetailsByConfigRule Text
gcdbcrConfigRuleName = lens _gcdbcrConfigRuleName (\ s a -> s{_gcdbcrConfigRuleName = a});

instance AWSPager GetComplianceDetailsByConfigRule
where
page rq rs
| stop (rs ^. gcdbcrrsNextToken) = Nothing
| stop (rs ^. gcdbcrrsEvaluationResults) = Nothing
| otherwise =
Just $ rq &
gcdbcrNextToken .~ rs ^. gcdbcrrsNextToken

instance AWSRequest GetComplianceDetailsByConfigRule
where
type Rs GetComplianceDetailsByConfigRule =
Expand Down
Loading

0 comments on commit 7f2d8d1

Please sign in to comment.