Copyright | (c) 2013-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Creates or updates a rule. Rules are enabled by default, or based on value of the State parameter. You can disable a rule using DisableRule.
Note: When you create or update a rule, incoming events might not immediately start matching to new or updated rules. Please allow a short period of time for changes to take effect.
A rule must contain at least an EventPattern or ScheduleExpression. Rules with EventPatterns are triggered when a matching event is observed. Rules with ScheduleExpressions self-trigger based on the given schedule. A rule can have both an EventPattern and a ScheduleExpression, in which case the rule will trigger on matching events as well as on a schedule.
Note: Most services in AWS treat : or / as the same character in Amazon Resource Names (ARNs). However, CloudWatch Events uses an exact match in event patterns and rules. Be sure to use the correct ARN characters when creating event patterns so that they match the ARN syntax in the event you want to match.
- putRule :: Text -> PutRule
- data PutRule
- prEventPattern :: Lens' PutRule (Maybe Text)
- prState :: Lens' PutRule (Maybe RuleState)
- prScheduleExpression :: Lens' PutRule (Maybe Text)
- prDescription :: Lens' PutRule (Maybe Text)
- prRoleARN :: Lens' PutRule (Maybe Text)
- prName :: Lens' PutRule Text
- putRuleResponse :: Int -> PutRuleResponse
- data PutRuleResponse
- prrsRuleARN :: Lens' PutRuleResponse (Maybe Text)
- prrsResponseStatus :: Lens' PutRuleResponse Int
Creating a Request
Creates a value of PutRule
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
Request Lenses
prState :: Lens' PutRule (Maybe RuleState) Source #
Indicates whether the rule is enabled or disabled.
prScheduleExpression :: Lens' PutRule (Maybe Text) Source #
The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)".
prRoleARN :: Lens' PutRule (Maybe Text) Source #
The Amazon Resource Name (ARN) of the IAM role associated with the rule.
Destructuring the Response
Creates a value of PutRuleResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data PutRuleResponse Source #
The result of the PutRule operation.
See: putRuleResponse
smart constructor.
Response Lenses
prrsRuleARN :: Lens' PutRuleResponse (Maybe Text) Source #
The Amazon Resource Name (ARN) that identifies the rule.
prrsResponseStatus :: Lens' PutRuleResponse Int Source #
The response status code.