Class: AWSCDK::EC2::CfnNetworkAclEntry::IcmpProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/cfn_network_acl_entry.rb

Overview

Describes the ICMP type and code.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code: nil, type: nil) ⇒ IcmpProperty

Returns a new instance of IcmpProperty.

Parameters:

  • code (Numeric, nil) (defaults to: nil)

    The Internet Control Message Protocol (ICMP) code.

  • type (Numeric, nil) (defaults to: nil)

    The Internet Control Message Protocol (ICMP) type.



613
614
615
616
617
618
# File 'ec2/cfn_network_acl_entry.rb', line 613

def initialize(code: nil, type: nil)
  @code = code
  Jsii::Type.check_type(@code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "code") unless @code.nil?
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "type") unless @type.nil?
end

Instance Attribute Details

#codeNumeric? (readonly)

The Internet Control Message Protocol (ICMP) code.

You can use -1 to specify all ICMP codes for the given ICMP type. Required if you specify 1 (ICMP) for the protocol parameter.



626
627
628
# File 'ec2/cfn_network_acl_entry.rb', line 626

def code
  @code
end

#typeNumeric? (readonly)

The Internet Control Message Protocol (ICMP) type.

You can use -1 to specify all ICMP types. Conditional requirement: Required if you specify 1 (ICMP) for the CreateNetworkAclEntry protocol parameter.



633
634
635
# File 'ec2/cfn_network_acl_entry.rb', line 633

def type
  @type
end

Class Method Details

.jsii_propertiesObject



635
636
637
638
639
640
# File 'ec2/cfn_network_acl_entry.rb', line 635

def self.jsii_properties
  {
    :code => "code",
    :type => "type",
  }
end

Instance Method Details

#to_jsiiObject



642
643
644
645
646
647
648
649
# File 'ec2/cfn_network_acl_entry.rb', line 642

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