Class: AWSCDK::Shield::CfnProtection::ActionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
shield/cfn_protection.rb

Overview

Specifies the action setting that Shield Advanced should use in the AWS WAF rules that it creates on behalf of the protected resource in response to DDoS attacks.

You specify this as part of the configuration for the automatic application layer DDoS mitigation feature, when you enable or update automatic mitigation. Shield Advanced creates the AWS WAF rules in a Shield Advanced-managed rule group, inside the web ACL that you have associated with the resource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(block: nil, count: nil) ⇒ ActionProperty

Returns a new instance of ActionProperty.

Parameters:

  • block (Object, nil) (defaults to: nil)

    Specifies that Shield Advanced should configure its AWS WAF rules with the AWS WAF Block action.

  • count (Object, nil) (defaults to: nil)

    Specifies that Shield Advanced should configure its AWS WAF rules with the AWS WAF Count action.



603
604
605
606
607
608
# File 'shield/cfn_protection.rb', line 603

def initialize(block: nil, count: nil)
  @block = block
  Jsii::Type.check_type(@block, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "block") unless @block.nil?
  @count = count
  Jsii::Type.check_type(@count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "count") unless @count.nil?
end

Instance Attribute Details

#blockObject? (readonly)

Specifies that Shield Advanced should configure its AWS WAF rules with the AWS WAF Block action.

You must specify exactly one action, either Block or Count .

Example JSON: { "Block": {} }

Example YAML: Block: {}



620
621
622
# File 'shield/cfn_protection.rb', line 620

def block
  @block
end

#countObject? (readonly)

Specifies that Shield Advanced should configure its AWS WAF rules with the AWS WAF Count action.

You must specify exactly one action, either Block or Count .

Example JSON: { "Count": {} }

Example YAML: Count: {}



631
632
633
# File 'shield/cfn_protection.rb', line 631

def count
  @count
end

Class Method Details

.jsii_propertiesObject



633
634
635
636
637
638
# File 'shield/cfn_protection.rb', line 633

def self.jsii_properties
  {
    :block => "block",
    :count => "count",
  }
end

Instance Method Details

#to_jsiiObject



640
641
642
643
644
645
646
647
# File 'shield/cfn_protection.rb', line 640

def to_jsii
  result = {}
  result.merge!({
    "block" => @block,
    "count" => @count,
  })
  result.compact
end