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 |
Network.AWS.ELBv2.CreateRule
Description
Creates a rule for the specified listener.
Each rule can have one action and one condition. Rules are evaluated in priority order, from the lowest value to the highest value. When the condition for a rule is met, the specified action is taken. If no conditions are met, the default action for the default rule is taken. For more information, see Listener Rules in the Application Load Balancers Guide .
To view your current rules, use DescribeRules
. To update a rule, use ModifyRule
. To set the priorities of your rules, use SetRulePriorities
. To delete a rule, use DeleteRule
.
- createRule :: Text -> Natural -> CreateRule
- data CreateRule
- crListenerARN :: Lens' CreateRule Text
- crConditions :: Lens' CreateRule [RuleCondition]
- crPriority :: Lens' CreateRule Natural
- crActions :: Lens' CreateRule [Action]
- createRuleResponse :: Int -> CreateRuleResponse
- data CreateRuleResponse
- crrsRules :: Lens' CreateRuleResponse [Rule]
- crrsResponseStatus :: Lens' CreateRuleResponse Int
Creating a Request
Arguments
:: Text | |
-> Natural | |
-> CreateRule |
Creates a value of CreateRule
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
crListenerARN
- The Amazon Resource Name (ARN) of the listener.crConditions
- A condition. Each condition has the fieldpath-pattern
and specifies one path pattern. A path pattern is case sensitive, can be up to 255 characters in length, and can contain any of the following characters: * A-Z, a-z, 0-9 * _ - . $ / ~ " ' @ : + * & (using &) * * (matches 0 or more characters) * ? (matches exactly 1 character)crPriority
- The priority for the rule. A listener can't have multiple rules with the same priority.crActions
- An action. Each action has the typeforward
and specifies a target group.
Request Lenses
crListenerARN :: Lens' CreateRule Text #
The Amazon Resource Name (ARN) of the listener.
crConditions :: Lens' CreateRule [RuleCondition] #
A condition. Each condition has the field path-pattern
and specifies one path pattern. A path pattern is case sensitive, can be up to 255 characters in length, and can contain any of the following characters: * A-Z, a-z, 0-9 * _ - . $ / ~ " ' @ : + * & (using &) * * (matches 0 or more characters) * ? (matches exactly 1 character)
crPriority :: Lens' CreateRule Natural #
The priority for the rule. A listener can't have multiple rules with the same priority.
crActions :: Lens' CreateRule [Action] #
An action. Each action has the type forward
and specifies a target group.
Destructuring the Response
Arguments
:: Int | |
-> CreateRuleResponse |
Creates a value of CreateRuleResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
crrsRules
- Information about the rule.crrsResponseStatus
- -- | The response status code.
data CreateRuleResponse #
Contains the output of CreateRule.
See: createRuleResponse
smart constructor.
Response Lenses
crrsRules :: Lens' CreateRuleResponse [Rule] #
Information about the rule.
crrsResponseStatus :: Lens' CreateRuleResponse Int #
- - | The response status code.