amazonka-cloudwatch-events-1.4.4: 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 Source #

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:

data PutRule Source #

Container for the parameters to the PutRule operation.

See: putRule smart constructor.

Instances

Eq PutRule Source # 

Methods

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

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

Data PutRule Source # 

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 Source # 
Show PutRule Source # 
Generic PutRule Source # 

Associated Types

type Rep PutRule :: * -> * #

Methods

from :: PutRule -> Rep PutRule x #

to :: Rep PutRule x -> PutRule #

Hashable PutRule Source # 

Methods

hashWithSalt :: Int -> PutRule -> Int #

hash :: PutRule -> Int #

NFData PutRule Source # 

Methods

rnf :: PutRule -> () #

AWSRequest PutRule Source # 

Associated Types

type Rs PutRule :: * #

ToPath PutRule Source # 

Methods

toPath :: PutRule -> ByteString #

ToHeaders PutRule Source # 

Methods

toHeaders :: PutRule -> [Header] #

ToQuery PutRule Source # 
ToJSON PutRule Source # 

Methods

toJSON :: PutRule -> Value #

toEncoding :: PutRule -> Encoding #

type Rep PutRule Source # 
type Rep PutRule = D1 (MetaData "PutRule" "Network.AWS.CloudWatchEvents.PutRule" "amazonka-cloudwatch-events-1.4.4-KZ4l8o6fE916IyhwOgxY8Z" 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 Source # 

Request Lenses

prEventPattern :: Lens' PutRule (Maybe Text) Source #

The event pattern.

prState :: Lens' PutRule (Maybe RuleState) Source #

Indicates whether the rule is enabled or disabled.

prScheduleExpression :: Lens' PutRule (Maybe Text) Source #

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

prDescription :: Lens' PutRule (Maybe Text) Source #

A description of the rule.

prRoleARN :: Lens' PutRule (Maybe Text) Source #

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

prName :: Lens' PutRule Text Source #

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

Destructuring the Response

putRuleResponse Source #

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 Source #

The result of the PutRule operation.

See: putRuleResponse smart constructor.

Instances

Eq PutRuleResponse Source # 
Data PutRuleResponse Source # 

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 Source # 
Show PutRuleResponse Source # 
Generic PutRuleResponse Source # 
NFData PutRuleResponse Source # 

Methods

rnf :: PutRuleResponse -> () #

type Rep PutRuleResponse Source # 
type Rep PutRuleResponse = D1 (MetaData "PutRuleResponse" "Network.AWS.CloudWatchEvents.PutRule" "amazonka-cloudwatch-events-1.4.4-KZ4l8o6fE916IyhwOgxY8Z" 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) Source #

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

prrsResponseStatus :: Lens' PutRuleResponse Int Source #

The response status code.