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 Sep 11, 2016
1 parent f4c94a5 commit 1cae62c
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,22 @@
--
-- Evaluates your resources against the specified Config rules. You can specify up to 25 Config rules per request.
--
-- An existing < StartConfigRulesEvaluation> call must complete for the rules that you specified before you can call the API again. If you chose to have AWS Config stream to an Amazon SNS topic, you will receive a notification when the evaluation starts.
-- An existing < StartConfigRulesEvaluation> call must complete for the specified rules before you can call the API again. If you chose to have AWS Config stream to an Amazon SNS topic, you will receive a 'ConfigRuleEvaluationStarted' notification when the evaluation starts.
--
-- You don\'t need to call the 'StartConfigRulesEvaluation' API to run an evaluation for a new rule. When you create a new rule, AWS Config automatically evaluates your resources against the rule.
--
-- The 'StartConfigRulesEvaluation' API is useful if you want to run on-demand evaluations, such as the following example:
--
-- 1. You have a custom rule that evaluates your IAM resources every 24 hours.
--
-- 2. You update your Lambda function to add additional conditions to your rule.
--
-- 3. Instead of waiting for the next periodic evaluation, you call the 'StartConfigRulesEvaluation' API.
--
-- 4. AWS Config invokes your Lambda function and evaluates your IAM resources.
--
-- 5. Your custom rule will still run periodic evaluations every 24 hours.
--
module Network.AWS.Config.StartConfigRulesEvaluation
(
-- * Creating a Request
Expand Down
2 changes: 1 addition & 1 deletion amazonka-config/gen/Network/AWS/Config/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ _InvalidS3KeyPrefixException :: AsError a => Getting (First ServiceError) a Serv
_InvalidS3KeyPrefixException =
_ServiceError . hasCode "InvalidS3KeyPrefixException"

-- | This exception is thrown when the previous < StartConfigRulesEvaluation> call is in progress or a previous evaluation is in progress.
-- | This exception is thrown if an evaluation is in progress or if you call the < StartConfigRulesEvaluation> API more than once per minute.
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_LimitExceededException = _ServiceError . hasCode "LimitExceededException"

Expand Down
32 changes: 17 additions & 15 deletions amazonka-config/gen/Network/AWS/Config/Types/Product.hs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ instance Hashable ConfigExportDeliveryInfo

instance NFData ConfigExportDeliveryInfo

-- | An AWS Lambda function that evaluates configuration items to assess whether your AWS resources comply with your desired configurations. This function can run when AWS Config detects a configuration change to an AWS resource and at a periodic frequency that you choose (for example, every 24 hours).
-- | An AWS Config rule represents an AWS Lambda function that you create for a custom rule or a predefined function for an AWS managed rule. The function evaluates configuration items to assess whether your AWS resources comply with your desired configurations. This function can run when AWS Config detects a configuration change to an AWS resource and at a periodic frequency that you choose (for example, every 24 hours).
--
-- You can use the AWS CLI and AWS SDKs if you want to create a rule that triggers evaluations for your resources when AWS Config delivers the configuration snapshot. For more information, see < ConfigSnapshotDeliveryProperties>.
--
Expand Down Expand Up @@ -445,11 +445,11 @@ crInputParameters = lens _crInputParameters (\ s a -> s{_crInputParameters = a})
crConfigRuleName :: Lens' ConfigRule (Maybe Text)
crConfigRuleName = lens _crConfigRuleName (\ s a -> s{_crConfigRuleName = a});

-- | If you want to create a rule that evaluates at a frequency that is independent of the configuration snapshot delivery, use the 'MaximumExecutionFrequency' parameter in the < SourceDetail> object.
-- | The maximum frequency with which AWS Config runs evaluations for a rule. You can specify a value for 'MaximumExecutionFrequency' when:
--
-- If you want to create a rule that triggers evaluations for your resources when AWS Config delivers the configuration snapshot, see the following:
-- - You are using an AWS managed rule that is triggered at a periodic frequency.
--
-- A rule that runs an evaluation when AWS Config delivers a configuration snapshot cannot run evaluations more frequently than AWS Config delivers the snapshots. Set the value of the 'MaximumExecutionFrequency' to be equal to or greater than the value of the 'deliveryFrequency' key, which is part of 'ConfigSnapshotDeliveryProperties'.
-- - Your custom rule is triggered when AWS Config delivers the configuration snapshot.
--
-- For more information, see < ConfigSnapshotDeliveryProperties>.
crMaximumExecutionFrequency :: Lens' ConfigRule (Maybe MaximumExecutionFrequency)
Expand Down Expand Up @@ -648,7 +648,7 @@ instance Hashable ConfigRuleEvaluationStatus

instance NFData ConfigRuleEvaluationStatus

-- | Shows the options for how often AWS Config delivers configuration snapshots to the Amazon S3 bucket in your delivery channel.
-- | Provides options for how often AWS Config delivers configuration snapshots to the Amazon S3 bucket in your delivery channel.
--
-- If you want to create a rule that triggers evaluations for your resources when AWS Config delivers the configuration snapshot, see the following:
--
Expand All @@ -660,15 +660,17 @@ instance NFData ConfigRuleEvaluationStatus
--
-- If the 'deliveryFrequency' value is less frequent than the 'MaximumExecutionFrequency' value for a rule, AWS Config invokes the rule only as often as the 'deliveryFrequency' value.
--
-- 1. For example, you have a rule and you specify the 'MaximumExecutionFrequency' value to be 'Six_Hours'.
-- 1. For example, you want your rule to run evaluations when AWS Config delivers the configuration snapshot.
--
-- 2. You specify the 'MaximumExecutionFrequency' value for 'Six_Hours'.
--
-- 2. You then specify the delivery channel 'deliveryFrequency' value to 'TwentyFour_Hours'.
-- 3. You then specify the delivery channel 'deliveryFrequency' value for 'TwentyFour_Hours'.
--
-- 3. Because the value for 'deliveryFrequency' is less frequent than 'MaximumExecutionFrequency', AWS Config invokes evaluations for the rule every 24 hours.
-- 4. Because the value for 'deliveryFrequency' is less frequent than 'MaximumExecutionFrequency', AWS Config invokes evaluations for the rule every 24 hours.
--
-- You should set the 'MaximumExecutionFrequency' value to be at least as frequent as the 'deliveryFrequency' value. You can view the 'deliveryFrequency' value by using the 'DescribeDeliveryChannnels' action.
--
-- To update the frequency with which AWS Config delivers your configuration snapshots, use the 'PutDeliveryChannel' action.
-- To update the 'deliveryFrequency' with which AWS Config delivers your configuration snapshots, use the 'PutDeliveryChannel' action.
--
-- /See:/ 'configSnapshotDeliveryProperties' smart constructor.
newtype ConfigSnapshotDeliveryProperties = ConfigSnapshotDeliveryProperties'
Expand Down Expand Up @@ -1880,7 +1882,7 @@ instance ToJSON Source where
("Owner" .=) <$> _sOwner,
("SourceDetails" .=) <$> _sSourceDetails])

-- | Provides the source and the message type that trigger AWS Config to evaluate your AWS resources against a rule. It also provides the frequency with which you want AWS Config to run evaluations for the rule if the trigger type is periodic.
-- | Provides the source and the message types that trigger AWS Config to evaluate your AWS resources against a rule. It also provides the frequency with which you want AWS Config to run evaluations for the rule if the trigger type is periodic. You can specify the parameter values for 'SourceDetail' only for custom rules.
--
-- /See:/ 'sourceDetail' smart constructor.
data SourceDetail = SourceDetail'
Expand All @@ -1907,17 +1909,17 @@ sourceDetail =
, _sdEventSource = Nothing
}

-- | The type of SNS message that triggers AWS Config to run an evaluation.
-- | The type of notification that triggers AWS Config to run an evaluation. You can specify the following notification types:
--
-- For evaluations that are initiated when AWS Config delivers a configuration item change notification, you must use 'ConfigurationItemChangeNotification'.
-- 'ConfigurationItemChangeNotification' - Triggers an evaluation when AWS Config delivers a configuration item change notification.
--
-- For evaluations that are initiated at a frequency that you choose (for example, every 24 hours), you must use 'ScheduledNotification'.
-- 'ScheduledNotification' - Triggers a periodic evaluation at the frequency specified for 'MaximumExecutionFrequency'.
--
-- For evaluations that are initiated when AWS Config delivers a configuration snapshot, you must use 'ConfigurationSnapshotDeliveryCompleted'.
-- 'ConfigurationSnapshotDeliveryCompleted' - Triggers a periodic evaluation when AWS Config delivers a configuration snapshot.
sdMessageType :: Lens' SourceDetail (Maybe MessageType)
sdMessageType = lens _sdMessageType (\ s a -> s{_sdMessageType = a});

-- | If the trigger type for your rule includes periodic, AWS Config runs evaluations for the rule at a frequency that you choose. If you specify a value for 'MaximumExecutionFrequency', then 'MessageType' must use the 'ScheduledNotification' value.
-- | The frequency that you want AWS Config to run evaluations for a rule that is triggered periodically. If you specify a value for 'MaximumExecutionFrequency', then 'MessageType' must use the 'ScheduledNotification' value.
sdMaximumExecutionFrequency :: Lens' SourceDetail (Maybe MaximumExecutionFrequency)
sdMaximumExecutionFrequency = lens _sdMaximumExecutionFrequency (\ s a -> s{_sdMaximumExecutionFrequency = a});

Expand Down
5 changes: 4 additions & 1 deletion amazonka-config/gen/Network/AWS/Config/Types/Sum.hs
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ data ResourceType
| AWSEC2VPNConnection
| AWSEC2VPNGateway
| AWSEC2Volume
| AWSELASTICLOADBALANCINGV2LoadBalancer
| AWSIAMGroup
| AWSIAMPolicy
| AWSIAMRole
Expand Down Expand Up @@ -376,6 +377,7 @@ instance FromText ResourceType where
"aws::ec2::vpnconnection" -> pure AWSEC2VPNConnection
"aws::ec2::vpngateway" -> pure AWSEC2VPNGateway
"aws::ec2::volume" -> pure AWSEC2Volume
"aws::elasticloadbalancingv2::loadbalancer" -> pure AWSELASTICLOADBALANCINGV2LoadBalancer
"aws::iam::group" -> pure AWSIAMGroup
"aws::iam::policy" -> pure AWSIAMPolicy
"aws::iam::role" -> pure AWSIAMRole
Expand All @@ -386,7 +388,7 @@ instance FromText ResourceType where
"aws::rds::dbsubnetgroup" -> pure AWSRDSDBSubnetGroup
"aws::rds::eventsubscription" -> pure AWSRDSEventSubscription
e -> fromTextError $ "Failure parsing ResourceType from value: '" <> e
<> "'. Accepted values: aws::acm::certificate, aws::cloudtrail::trail, aws::ec2::customergateway, aws::ec2::eip, aws::ec2::host, aws::ec2::instance, aws::ec2::internetgateway, aws::ec2::networkacl, aws::ec2::networkinterface, aws::ec2::routetable, aws::ec2::securitygroup, aws::ec2::subnet, aws::ec2::vpc, aws::ec2::vpnconnection, aws::ec2::vpngateway, aws::ec2::volume, aws::iam::group, aws::iam::policy, aws::iam::role, aws::iam::user, aws::rds::dbinstance, aws::rds::dbsecuritygroup, aws::rds::dbsnapshot, aws::rds::dbsubnetgroup, aws::rds::eventsubscription"
<> "'. Accepted values: aws::acm::certificate, aws::cloudtrail::trail, aws::ec2::customergateway, aws::ec2::eip, aws::ec2::host, aws::ec2::instance, aws::ec2::internetgateway, aws::ec2::networkacl, aws::ec2::networkinterface, aws::ec2::routetable, aws::ec2::securitygroup, aws::ec2::subnet, aws::ec2::vpc, aws::ec2::vpnconnection, aws::ec2::vpngateway, aws::ec2::volume, aws::elasticloadbalancingv2::loadbalancer, aws::iam::group, aws::iam::policy, aws::iam::role, aws::iam::user, aws::rds::dbinstance, aws::rds::dbsecuritygroup, aws::rds::dbsnapshot, aws::rds::dbsubnetgroup, aws::rds::eventsubscription"

instance ToText ResourceType where
toText = \case
Expand All @@ -406,6 +408,7 @@ instance ToText ResourceType where
AWSEC2VPNConnection -> "AWS::EC2::VPNConnection"
AWSEC2VPNGateway -> "AWS::EC2::VPNGateway"
AWSEC2Volume -> "AWS::EC2::Volume"
AWSELASTICLOADBALANCINGV2LoadBalancer -> "AWS::ElasticLoadBalancingV2::LoadBalancer"
AWSIAMGroup -> "AWS::IAM::Group"
AWSIAMPolicy -> "AWS::IAM::Policy"
AWSIAMRole -> "AWS::IAM::Role"
Expand Down

0 comments on commit 1cae62c

Please sign in to comment.