# salt.modules.boto_cloudwatch_event

Connection module for Amazon CloudWatch Events

Added in version 2016.11.0.

configuration:

  This module accepts explicit credentials but can also utilize IAM roles assigned to the instance through Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no further configuration is necessary. More Information available at:

      http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html

  If IAM roles are not used you need to specify them either in a pillar or in the minion's config file:

      cloudwatch_event.keyid: GKTADJGHEIQSXMKKRBJ08H
      cloudwatch_event.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs

  A region may also be specified in the configuration:

      cloudwatch_event.region: us-east-1

  If a region is not specified, the default is us-east-1.

  It's also possible to specify key, keyid and region via a profile, either as a passed in dict, or as a string to pull from pillars or minion config:

      myprofile:
          keyid: GKTADJGHEIQSXMKKRBJ08H
          key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
          region: us-east-1

depends:

  boto3

salt.modules.boto_cloudwatch_event.create_or_update(Name, ScheduleExpression=None, EventPattern=None, Description=None, RoleArn=None, State=None, region=None, key=None, keyid=None, profile=None)

  Given a valid config, create an event rule.

  Returns {created: true} if the rule was created and returns {created: False} if the rule was not created.

  CLI Example:

      salt myminion boto_cloudwatch_event.create_or_update my_rule

salt.modules.boto_cloudwatch_event.delete(Name, region=None, key=None, keyid=None, profile=None)

  Given a rule name, delete it.

  Returns {deleted: true} if the rule was deleted and returns {deleted: false} if the rule was not deleted.

  CLI Example:

      salt myminion boto_cloudwatch_event.delete myrule

salt.modules.boto_cloudwatch_event.describe(Name, region=None, key=None, keyid=None, profile=None)

  Given a rule name describe its properties.

  Returns a dictionary of interesting properties.

  CLI Example:

      salt myminion boto_cloudwatch_event.describe myrule

salt.modules.boto_cloudwatch_event.exists(Name, region=None, key=None, keyid=None, profile=None)

  Given a rule name, check to see if the given rule exists.

  Returns True if the given rule exists and returns False if the given rule does not exist.

  CLI Example:

      salt myminion boto_cloudwatch_event.exists myevent region=us-east-1

salt.modules.boto_cloudwatch_event.list_rules(region=None, key=None, keyid=None, profile=None)

  List, with details, all Cloudwatch Event rules visible in the current scope.

  CLI Example:

      salt myminion boto_cloudwatch_event.list_rules region=us-east-1

salt.modules.boto_cloudwatch_event.list_targets(Rule, region=None, key=None, keyid=None, profile=None)

  Given a rule name list the targets of that rule.

  Returns a dictionary of interesting properties.

  CLI Example:

      salt myminion boto_cloudwatch_event.list_targets myrule

salt.modules.boto_cloudwatch_event.put_targets(Rule, Targets, region=None, key=None, keyid=None, profile=None)

  Add the given targets to the given rule

  Returns a dictionary describing any failures.

  CLI Example:

      salt myminion boto_cloudwatch_event.put_targets myrule [{'Id': 'target1', 'Arn': 'arn:***'}]

salt.modules.boto_cloudwatch_event.remove_targets(Rule, Ids, region=None, key=None, keyid=None, profile=None)

  Given a rule name remove the named targets from the target list

  Returns a dictionary describing any failures.

  CLI Example:

      salt myminion boto_cloudwatch_event.remove_targets myrule ['Target1']