Sha256: bdba612a438819489d0039da97d191860a3492246c4ea07281b7b444e0ea9f6b

Contents?: true

Size: 920 Bytes

Versions: 16

Compression:

Stored size: 920 Bytes

Contents

module CfnGuardian::Resource
  class ApiGateway < Base
    
    def default_alarms    
      alarm = CfnGuardian::Models::ApiGatewayAlarm.new(@resource)
      alarm.name = 'ApiEndpoint5xx'
      alarm.metric_name = '5XXError'
      alarm.statistic = 'Sum'
      alarm.threshold = 5
      alarm.evaluation_periods = 2
      @alarms.push(alarm)
      
      alarm = CfnGuardian::Models::ApiGatewayAlarm.new(@resource)
      alarm.name = 'ApiEndpoint4xx'
      alarm.metric_name = '4XXError'
      alarm.statistic = 'Sum'
      alarm.threshold = 5
      alarm.evaluation_periods = 2
      @alarms.push(alarm)
      
      alarm = CfnGuardian::Models::ApiGatewayAlarm.new(@resource)
      alarm.name = 'Latency'
      alarm.metric_name = 'Latency'
      alarm.statistic = 'Average'
      alarm.threshold = 1000
      alarm.evaluation_periods = 2
      alarm.enabled = false
      @alarms.push(alarm)
    end
    
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

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