amazonka-cloudwatch-events-1.4.5: Amazon CloudWatch Events 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.CloudWatchEvents.PutRule

Contents

Description

Creates or updates a rule. Rules are enabled by default, or based on value of the State parameter. You can disable a rule using DisableRule .

Note: When you create or update a rule, incoming events might not immediately start matching to new or updated rules. Please allow a short period of time for changes to take effect.

A rule must contain at least an EventPattern or ScheduleExpression. Rules with EventPatterns are triggered when a matching event is observed. Rules with ScheduleExpressions self-trigger based on the given schedule. A rule can have both an EventPattern and a ScheduleExpression, in which case the rule will trigger on matching events as well as on a schedule.

Note: Most services in AWS treat : or / as the same character in Amazon Resource Names (ARNs). However, CloudWatch Events uses an exact match in event patterns and rules. Be sure to use the correct ARN characters when creating event patterns so that they match the ARN syntax in the event you want to match.

Synopsis

Creating a Request

putRule #

Arguments

:: Text

prName

-> PutRule 

Creates a value of PutRule with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • prEventPattern - The event pattern.
  • prState - Indicates whether the rule is enabled or disabled.
  • prScheduleExpression - The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)".
  • prDescription - A description of the rule.
  • prRoleARN - The Amazon Resource Name (ARN) of the IAM role associated with the rule.
  • prName - The name of the rule that you are creating or updating.

data PutRule #

Container for the parameters to the PutRule operation.

See: putRule smart constructor.

Instances

Eq PutRule # 

Methods

(==) :: PutRule -> PutRule -> Bool #

(/=) :: PutRule -> PutRule -> Bool #

Data PutRule # 

Methods

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

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

toConstr :: PutRule -> Constr #

dataTypeOf :: PutRule -> DataType #

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

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

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

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

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

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

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

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

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

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

Read PutRule # 
Show PutRule # 
Generic PutRule # 

Associated Types

type Rep PutRule :: * -> * #

Methods

from :: PutRule -> Rep PutRule x #

to :: Rep PutRule x -> PutRule #

Hashable PutRule # 

Methods

hashWithSalt :: Int -> PutRule -> Int #

hash :: PutRule -> Int #

ToJSON PutRule # 
NFData PutRule # 

Methods

rnf :: PutRule -> () #

AWSRequest PutRule # 

Associated Types

type Rs PutRule :: * #

ToQuery PutRule # 
ToPath PutRule # 

Methods

toPath :: PutRule -> ByteString #

ToHeaders PutRule # 

Methods

toHeaders :: PutRule -> [Header] #

type Rep PutRule # 
type Rep PutRule = D1 (MetaData "PutRule" "Network.AWS.CloudWatchEvents.PutRule" "amazonka-cloudwatch-events-1.4.5-6DdwNqzTXs3BVXIlURV4bz" False) (C1 (MetaCons "PutRule'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_prEventPattern") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) ((:*:) (S1 (MetaSel (Just Symbol "_prState") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe RuleState))) (S1 (MetaSel (Just Symbol "_prScheduleExpression") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))) ((:*:) (S1 (MetaSel (Just Symbol "_prDescription") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) ((:*:) (S1 (MetaSel (Just Symbol "_prRoleARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_prName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))))
type Rs PutRule # 

Request Lenses

prEventPattern :: Lens' PutRule (Maybe Text) #

The event pattern.

prState :: Lens' PutRule (Maybe RuleState) #

Indicates whether the rule is enabled or disabled.

prScheduleExpression :: Lens' PutRule (Maybe Text) #

The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)".

prDescription :: Lens' PutRule (Maybe Text) #

A description of the rule.

prRoleARN :: Lens' PutRule (Maybe Text) #

The Amazon Resource Name (ARN) of the IAM role associated with the rule.

prName :: Lens' PutRule Text #

The name of the rule that you are creating or updating.

Destructuring the Response

putRuleResponse #

Creates a value of PutRuleResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data PutRuleResponse #

The result of the PutRule operation.

See: putRuleResponse smart constructor.

Instances

Eq PutRuleResponse # 
Data PutRuleResponse # 

Methods

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

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

toConstr :: PutRuleResponse -> Constr #

dataTypeOf :: PutRuleResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read PutRuleResponse # 
Show PutRuleResponse # 
Generic PutRuleResponse # 
NFData PutRuleResponse # 

Methods

rnf :: PutRuleResponse -> () #

type Rep PutRuleResponse # 
type Rep PutRuleResponse = D1 (MetaData "PutRuleResponse" "Network.AWS.CloudWatchEvents.PutRule" "amazonka-cloudwatch-events-1.4.5-6DdwNqzTXs3BVXIlURV4bz" False) (C1 (MetaCons "PutRuleResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_prrsRuleARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_prrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int))))

Response Lenses

prrsRuleARN :: Lens' PutRuleResponse (Maybe Text) #

The Amazon Resource Name (ARN) that identifies the rule.

prrsResponseStatus :: Lens' PutRuleResponse Int #

  • - | The response status code.