amazonka-elbv2-1.4.5: Amazon Elastic Load Balancing SDK.

Copyright(c) 2013-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.ELBv2.CreateRule

Contents

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 .

Synopsis

Creating a Request

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 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 &amp;) * * (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 type forward and specifies a target group.

data CreateRule #

Contains the parameters for CreateRule.

See: createRule smart constructor.

Instances

Eq CreateRule # 
Data CreateRule # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateRule -> c CreateRule #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateRule #

toConstr :: CreateRule -> Constr #

dataTypeOf :: CreateRule -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateRule) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateRule) #

gmapT :: (forall b. Data b => b -> b) -> CreateRule -> CreateRule #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateRule -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateRule -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateRule -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateRule -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateRule -> m CreateRule #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateRule -> m CreateRule #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateRule -> m CreateRule #

Read CreateRule # 
Show CreateRule # 
Generic CreateRule # 

Associated Types

type Rep CreateRule :: * -> * #

Hashable CreateRule # 
NFData CreateRule # 

Methods

rnf :: CreateRule -> () #

AWSRequest CreateRule # 
ToQuery CreateRule # 
ToPath CreateRule # 
ToHeaders CreateRule # 

Methods

toHeaders :: CreateRule -> [Header] #

type Rep CreateRule # 
type Rep CreateRule = D1 (MetaData "CreateRule" "Network.AWS.ELBv2.CreateRule" "amazonka-elbv2-1.4.5-1H99zq9GcvyVED37xNlPU" False) (C1 (MetaCons "CreateRule'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_crListenerARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_crConditions") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [RuleCondition]))) ((:*:) (S1 (MetaSel (Just Symbol "_crPriority") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Nat)) (S1 (MetaSel (Just Symbol "_crActions") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [Action])))))
type Rs CreateRule # 

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 &amp;) * * (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

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:

data CreateRuleResponse #

Contains the output of CreateRule.

See: createRuleResponse smart constructor.

Instances

Eq CreateRuleResponse # 
Data CreateRuleResponse # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateRuleResponse -> c CreateRuleResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateRuleResponse #

toConstr :: CreateRuleResponse -> Constr #

dataTypeOf :: CreateRuleResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateRuleResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateRuleResponse) #

gmapT :: (forall b. Data b => b -> b) -> CreateRuleResponse -> CreateRuleResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateRuleResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateRuleResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateRuleResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateRuleResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateRuleResponse -> m CreateRuleResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateRuleResponse -> m CreateRuleResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateRuleResponse -> m CreateRuleResponse #

Read CreateRuleResponse # 
Show CreateRuleResponse # 
Generic CreateRuleResponse # 
NFData CreateRuleResponse # 

Methods

rnf :: CreateRuleResponse -> () #

type Rep CreateRuleResponse # 
type Rep CreateRuleResponse = D1 (MetaData "CreateRuleResponse" "Network.AWS.ELBv2.CreateRule" "amazonka-elbv2-1.4.5-1H99zq9GcvyVED37xNlPU" False) (C1 (MetaCons "CreateRuleResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_crrsRules") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [Rule]))) (S1 (MetaSel (Just Symbol "_crrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int))))

Response Lenses

crrsRules :: Lens' CreateRuleResponse [Rule] #

Information about the rule.

crrsResponseStatus :: Lens' CreateRuleResponse Int #

  • - | The response status code.