Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Creates a rule for use with the specified detector.
Synopsis
- data CreateRule = CreateRule' {}
- newCreateRule :: Text -> Text -> Text -> Language -> NonEmpty Text -> CreateRule
- createRule_description :: Lens' CreateRule (Maybe Text)
- createRule_tags :: Lens' CreateRule (Maybe [Tag])
- createRule_ruleId :: Lens' CreateRule Text
- createRule_detectorId :: Lens' CreateRule Text
- createRule_expression :: Lens' CreateRule Text
- createRule_language :: Lens' CreateRule Language
- createRule_outcomes :: Lens' CreateRule (NonEmpty Text)
- data CreateRuleResponse = CreateRuleResponse' {
- rule :: Maybe Rule
- httpStatus :: Int
- newCreateRuleResponse :: Int -> CreateRuleResponse
- createRuleResponse_rule :: Lens' CreateRuleResponse (Maybe Rule)
- createRuleResponse_httpStatus :: Lens' CreateRuleResponse Int
Creating a Request
data CreateRule Source #
See: newCreateRule
smart constructor.
CreateRule' | |
|
Instances
Create a value of CreateRule
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:description:CreateRule'
, createRule_description
- The rule description.
$sel:tags:CreateRule'
, createRule_tags
- A collection of key and value pairs.
$sel:ruleId:CreateRule'
, createRule_ruleId
- The rule ID.
$sel:detectorId:CreateRule'
, createRule_detectorId
- The detector ID for the rule's parent detector.
$sel:expression:CreateRule'
, createRule_expression
- The rule expression.
$sel:language:CreateRule'
, createRule_language
- The language of the rule.
$sel:outcomes:CreateRule'
, createRule_outcomes
- The outcome or outcomes returned when the rule expression matches.
Request Lenses
createRule_description :: Lens' CreateRule (Maybe Text) Source #
The rule description.
createRule_tags :: Lens' CreateRule (Maybe [Tag]) Source #
A collection of key and value pairs.
createRule_ruleId :: Lens' CreateRule Text Source #
The rule ID.
createRule_detectorId :: Lens' CreateRule Text Source #
The detector ID for the rule's parent detector.
createRule_expression :: Lens' CreateRule Text Source #
The rule expression.
createRule_language :: Lens' CreateRule Language Source #
The language of the rule.
createRule_outcomes :: Lens' CreateRule (NonEmpty Text) Source #
The outcome or outcomes returned when the rule expression matches.
Destructuring the Response
data CreateRuleResponse Source #
See: newCreateRuleResponse
smart constructor.
CreateRuleResponse' | |
|
Instances
newCreateRuleResponse Source #
Create a value of CreateRuleResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:rule:CreateRuleResponse'
, createRuleResponse_rule
- The created rule.
$sel:httpStatus:CreateRuleResponse'
, createRuleResponse_httpStatus
- The response's http status code.
Response Lenses
createRuleResponse_rule :: Lens' CreateRuleResponse (Maybe Rule) Source #
The created rule.
createRuleResponse_httpStatus :: Lens' CreateRuleResponse Int Source #
The response's http status code.