Copyright | (c) 2013-2018 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 |
Language | Haskell2010 |
Creates a rule for the specified listener. The listener must be associated with an Application Load Balancer.
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 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
.
Synopsis
- 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
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
- The conditions. Each condition specifies a field name and a single value. If the field name ishost-header
, you can specify a single host name (for example, my.example.com). A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following characters. Note that you can include up to three wildcard characters. * A-Z, a-z, 0-9 * - . * * (matches 0 or more characters) * ? (matches exactly 1 character) If the field name ispath-pattern
, you can specify a single path pattern. A path pattern is case sensitive, can be up to 128 characters in length, and can contain any of the following characters. Note that you can include up to three wildcard 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.
data CreateRule Source #
See: createRule
smart constructor.
Instances
Request Lenses
crListenerARN :: Lens' CreateRule Text Source #
The Amazon Resource Name (ARN) of the listener.
crConditions :: Lens' CreateRule [RuleCondition] Source #
The conditions. Each condition specifies a field name and a single value. If the field name is host-header
, you can specify a single host name (for example, my.example.com). A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following characters. Note that you can include up to three wildcard characters. * A-Z, a-z, 0-9 * - . * * (matches 0 or more characters) * ? (matches exactly 1 character) If the field name is path-pattern
, you can specify a single path pattern. A path pattern is case sensitive, can be up to 128 characters in length, and can contain any of the following characters. Note that you can include up to three wildcard characters. * A-Z, a-z, 0-9 * _ - . $ / ~ " ' @ : + * & (using &) * * (matches 0 or more characters) * ? (matches exactly 1 character)
crPriority :: Lens' CreateRule Natural Source #
The priority for the rule. A listener can't have multiple rules with the same priority.
crActions :: Lens' CreateRule [Action] Source #
An action. Each action has the type forward
and specifies a target group.
Destructuring the Response
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 Source #
See: createRuleResponse
smart constructor.
Instances
Response Lenses
crrsResponseStatus :: Lens' CreateRuleResponse Int Source #
- - | The response status code.