Class: AWSCDK::ElasticLoadBalancingv2::CfnListenerRule::RewriteConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
elastic_load_balancingv2/cfn_listener_rule.rb

Overview

Information about a rewrite transform.

This transform matches a pattern and replaces it with the specified string.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(regex:, replace:) ⇒ RewriteConfigProperty

Returns a new instance of RewriteConfigProperty.

Parameters:

  • regex (String)

    The regular expression to match in the input string.

  • replace (String)

    The replacement string to use when rewriting the matched input.



1584
1585
1586
1587
1588
1589
# File 'elastic_load_balancingv2/cfn_listener_rule.rb', line 1584

def initialize(regex:, replace:)
  @regex = regex
  Jsii::Type.check_type(@regex, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "regex")
  @replace = replace
  Jsii::Type.check_type(@replace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "replace")
end

Instance Attribute Details

#regexString (readonly)

The regular expression to match in the input string.

The maximum length of the string is 1,024 characters.



1597
1598
1599
# File 'elastic_load_balancingv2/cfn_listener_rule.rb', line 1597

def regex
  @regex
end

#replaceString (readonly)

The replacement string to use when rewriting the matched input.

The maximum length of the string is 1,024 characters. You can specify capture groups in the regular expression (for example, $1 and $2).



1604
1605
1606
# File 'elastic_load_balancingv2/cfn_listener_rule.rb', line 1604

def replace
  @replace
end

Class Method Details

.jsii_propertiesObject



1606
1607
1608
1609
1610
1611
# File 'elastic_load_balancingv2/cfn_listener_rule.rb', line 1606

def self.jsii_properties
  {
    :regex => "regex",
    :replace => "replace",
  }
end

Instance Method Details

#to_jsiiObject



1613
1614
1615
1616
1617
1618
1619
1620
# File 'elastic_load_balancingv2/cfn_listener_rule.rb', line 1613

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