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 the specified listener. The listener must be associated with an Application Load Balancer.
Each rule consists of a priority, one or more actions, and one or more conditions. Rules are evaluated in priority order, from the lowest value to the highest value. When the conditions for a rule are met, its actions are performed. If the conditions for no rules are met, the actions for the default rule are performed. For more information, see Listener rules in the Application Load Balancers Guide.
Synopsis
- data CreateRule = CreateRule' {
- tags :: Maybe (NonEmpty Tag)
- listenerArn :: Text
- conditions :: [RuleCondition]
- priority :: Natural
- actions :: [Action]
- newCreateRule :: Text -> Natural -> CreateRule
- createRule_tags :: Lens' CreateRule (Maybe (NonEmpty Tag))
- createRule_listenerArn :: Lens' CreateRule Text
- createRule_conditions :: Lens' CreateRule [RuleCondition]
- createRule_priority :: Lens' CreateRule Natural
- createRule_actions :: Lens' CreateRule [Action]
- data CreateRuleResponse = CreateRuleResponse' {
- rules :: Maybe [Rule]
- httpStatus :: Int
- newCreateRuleResponse :: Int -> CreateRuleResponse
- createRuleResponse_rules :: 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:tags:CreateRule'
, createRule_tags
- The tags to assign to the rule.
$sel:listenerArn:CreateRule'
, createRule_listenerArn
- The Amazon Resource Name (ARN) of the listener.
$sel:conditions:CreateRule'
, createRule_conditions
- The conditions.
$sel:priority:CreateRule'
, createRule_priority
- The rule priority. A listener can't have multiple rules with the same
priority.
$sel:actions:CreateRule'
, createRule_actions
- The actions.
Request Lenses
createRule_tags :: Lens' CreateRule (Maybe (NonEmpty Tag)) Source #
The tags to assign to the rule.
createRule_listenerArn :: Lens' CreateRule Text Source #
The Amazon Resource Name (ARN) of the listener.
createRule_conditions :: Lens' CreateRule [RuleCondition] Source #
The conditions.
createRule_priority :: Lens' CreateRule Natural Source #
The rule priority. A listener can't have multiple rules with the same priority.
createRule_actions :: Lens' CreateRule [Action] Source #
The actions.
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:rules:CreateRuleResponse'
, createRuleResponse_rules
- Information about the rule.
$sel:httpStatus:CreateRuleResponse'
, createRuleResponse_httpStatus
- The response's http status code.
Response Lenses
createRuleResponse_rules :: Lens' CreateRuleResponse (Maybe [Rule]) Source #
Information about the rule.
createRuleResponse_httpStatus :: Lens' CreateRuleResponse Int Source #
The response's http status code.