Sha256: 484c919bdc324351d61e84a0a24d53d2c3b32498b088eb96557f20c1d65b9a3b

Contents?: true

Size: 1.6 KB

Versions: 58

Compression:

Stored size: 1.6 KB

Contents

module CfnGuardian::Resource
  class DynamoDBTable < Base
    
    def default_alarms    
      alarm = CfnGuardian::Models::DynamoDBTableAlarm.new(@resource)
      alarm.name = 'DynamoDBReadUsage'
      alarm.metric_name = 'ConsumedReadCapacityUnits'
      alarm.statistic = 'Sum'
      alarm.threshold = 80
      alarm.evaluation_periods = 2
      alarm.alarm_action = 'Warning'
      @alarms.push(alarm)
      
      alarm = CfnGuardian::Models::DynamoDBTableAlarm.new(@resource)
      alarm.name = 'DynamoDBWriteUsage'
      alarm.metric_name = 'ConsumedWriteCapacityUnits'
      alarm.statistic = 'Sum'
      alarm.threshold = 80
      alarm.evaluation_periods = 2
      alarm.alarm_action = 'Warning'
      @alarms.push(alarm)
      
      alarm = CfnGuardian::Models::DynamoDBTableAlarm.new(@resource)
      alarm.name = 'DynamoDBReadThrottleEvents'
      alarm.metric_name = 'ReadThrottleEvents'
      alarm.comparison_operator = 'GreaterThanOrEqualToThreshold'
      alarm.statistic = 'Sum'
      alarm.threshold = 1
      alarm.evaluation_periods = 2
      alarm.alarm_action = 'Warning'
      alarm.treat_missing_data = 'notBreaching'
      @alarms.push(alarm)
      
      alarm = CfnGuardian::Models::DynamoDBTableAlarm.new(@resource)
      alarm.name = 'DynamoDBWriteThrottleEvents'
      alarm.metric_name = 'WriteThrottleEvents'
      alarm.comparison_operator = 'GreaterThanOrEqualToThreshold'
      alarm.statistic = 'Sum'
      alarm.threshold = 1
      alarm.evaluation_periods = 2
      alarm.alarm_action = 'Warning'
      alarm.treat_missing_data = 'notBreaching'
      @alarms.push(alarm)
    end
    
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
cfn-guardian-0.11.11 lib/cfnguardian/resources/dynamodb_table.rb
cfn-guardian-0.11.10 lib/cfnguardian/resources/dynamodb_table.rb
cfn-guardian-0.11.9 lib/cfnguardian/resources/dynamodb_table.rb
cfn-guardian-0.11.8 lib/cfnguardian/resources/dynamodb_table.rb
cfn-guardian-0.11.7 lib/cfnguardian/resources/dynamodb_table.rb
cfn-guardian-0.11.6 lib/cfnguardian/resources/dynamodb_table.rb
cfn-guardian-0.11.5 lib/cfnguardian/resources/dynamodb_table.rb
cfn-guardian-0.11.4 lib/cfnguardian/resources/dynamodb_table.rb
cfn-guardian-0.11.3 lib/cfnguardian/resources/dynamodb_table.rb
cfn-guardian-0.11.2 lib/cfnguardian/resources/dynamodb_table.rb
cfn-guardian-0.11.1 lib/cfnguardian/resources/dynamodb_table.rb
cfn-guardian-0.11.0 lib/cfnguardian/resources/dynamodb_table.rb
cfn-guardian-0.10.4 lib/cfnguardian/resources/dynamodb_table.rb
cfn-guardian-0.10.1 lib/cfnguardian/resources/dynamodb_table.rb
cfn-guardian-0.10.0 lib/cfnguardian/resources/dynamodb_table.rb
cfn-guardian-0.9.2 lib/cfnguardian/resources/dynamodb_table.rb
cfn-guardian-0.9.1 lib/cfnguardian/resources/dynamodb_table.rb
cfn-guardian-0.9.0 lib/cfnguardian/resources/dynamodb_table.rb
cfn-guardian-0.8.6 lib/cfnguardian/resources/dynamodb_table.rb
cfn-guardian-0.8.5 lib/cfnguardian/resources/dynamodb_table.rb