amazonka-cloudwatch-events-1.6.1: Amazon CloudWatch Events SDK.

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

Network.AWS.CloudWatchEvents.PutRule

Contents

Description

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

If you are updating an existing rule, the rule is completely replaced with what you specify in this PutRule command. If you omit arguments in PutRule , the old values for those arguments are not kept. Instead, they are replaced with null values.

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 triggers on matching events as well as on a schedule.

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:

  • prEventPattern - The event pattern. For more information, see Events and Event Patterns in the Amazon CloudWatch Events User Guide .
  • prState - Indicates whether the rule is enabled or disabled.
  • prScheduleExpression - The scheduling expression. For example, "cron(0 20 * * ? *)" or "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 Source #

See: putRule smart constructor.

Instances
Eq PutRule Source # 
Instance details

Defined in Network.AWS.CloudWatchEvents.PutRule

Methods

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

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

Data PutRule Source # 
Instance details

Defined in Network.AWS.CloudWatchEvents.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 Source # 
Instance details

Defined in Network.AWS.CloudWatchEvents.PutRule

Show PutRule Source # 
Instance details

Defined in Network.AWS.CloudWatchEvents.PutRule

Generic PutRule Source # 
Instance details

Defined in Network.AWS.CloudWatchEvents.PutRule

Associated Types

type Rep PutRule :: Type -> Type #

Methods

from :: PutRule -> Rep PutRule x #

to :: Rep PutRule x -> PutRule #

Hashable PutRule Source # 
Instance details

Defined in Network.AWS.CloudWatchEvents.PutRule

Methods

hashWithSalt :: Int -> PutRule -> Int #

hash :: PutRule -> Int #

ToJSON PutRule Source # 
Instance details

Defined in Network.AWS.CloudWatchEvents.PutRule

AWSRequest PutRule Source # 
Instance details

Defined in Network.AWS.CloudWatchEvents.PutRule

Associated Types

type Rs PutRule :: Type #

ToHeaders PutRule Source # 
Instance details

Defined in Network.AWS.CloudWatchEvents.PutRule

Methods

toHeaders :: PutRule -> [Header] #

ToPath PutRule Source # 
Instance details

Defined in Network.AWS.CloudWatchEvents.PutRule

Methods

toPath :: PutRule -> ByteString #

ToQuery PutRule Source # 
Instance details

Defined in Network.AWS.CloudWatchEvents.PutRule

NFData PutRule Source # 
Instance details

Defined in Network.AWS.CloudWatchEvents.PutRule

Methods

rnf :: PutRule -> () #

type Rep PutRule Source # 
Instance details

Defined in Network.AWS.CloudWatchEvents.PutRule

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

Defined in Network.AWS.CloudWatchEvents.PutRule

Request Lenses

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

The event pattern. For more information, see Events and Event Patterns in the Amazon CloudWatch Events User Guide .

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 * * ? *)" or "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 #

See: putRuleResponse smart constructor.

Instances
Eq PutRuleResponse Source # 
Instance details

Defined in Network.AWS.CloudWatchEvents.PutRule

Data PutRuleResponse Source # 
Instance details

Defined in Network.AWS.CloudWatchEvents.PutRule

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 # 
Instance details

Defined in Network.AWS.CloudWatchEvents.PutRule

Show PutRuleResponse Source # 
Instance details

Defined in Network.AWS.CloudWatchEvents.PutRule

Generic PutRuleResponse Source # 
Instance details

Defined in Network.AWS.CloudWatchEvents.PutRule

Associated Types

type Rep PutRuleResponse :: Type -> Type #

NFData PutRuleResponse Source # 
Instance details

Defined in Network.AWS.CloudWatchEvents.PutRule

Methods

rnf :: PutRuleResponse -> () #

type Rep PutRuleResponse Source # 
Instance details

Defined in Network.AWS.CloudWatchEvents.PutRule

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

Response Lenses

prrsRuleARN :: Lens' PutRuleResponse (Maybe Text) Source #

The Amazon Resource Name (ARN) of the rule.

prrsResponseStatus :: Lens' PutRuleResponse Int Source #

  • - | The response status code.