Class: AWSCDK::ObservabilityAdmin::CfnTelemetryRule::FieldToMatchProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
observability_admin/cfn_telemetry_rule.rb

Overview

Specifies a field in the request to redact from WAF logs, such as headers, query parameters, or body content.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method: nil, query_string: nil, single_header: nil, uri_path: nil) ⇒ FieldToMatchProperty

Returns a new instance of FieldToMatchProperty.

Parameters:

  • method (String, nil) (defaults to: nil)

    Redacts the HTTP method from WAF logs.

  • query_string (String, nil) (defaults to: nil)

    Redacts the entire query string from WAF logs.

  • single_header (AWSCDK::IResolvable, AWSCDK::ObservabilityAdmin::CfnTelemetryRule::SingleHeaderProperty, nil) (defaults to: nil)

    Redacts a specific header field by name from WAF logs.

  • uri_path (String, nil) (defaults to: nil)

    Redacts the URI path from WAF logs.



838
839
840
841
842
843
844
845
846
847
# File 'observability_admin/cfn_telemetry_rule.rb', line 838

def initialize(method: nil, query_string: nil, single_header: nil, uri_path: nil)
  @method = method
  Jsii::Type.check_type(@method, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "method") unless @method.nil?
  @query_string = query_string
  Jsii::Type.check_type(@query_string, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "queryString") unless @query_string.nil?
  @single_header = single_header.is_a?(Hash) ? ::AWSCDK::ObservabilityAdmin::CfnTelemetryRule::SingleHeaderProperty.new(**single_header.transform_keys(&:to_sym)) : single_header
  Jsii::Type.check_type(@single_header, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19vYnNlcnZhYmlsaXR5YWRtaW4uQ2ZuVGVsZW1ldHJ5UnVsZS5TaW5nbGVIZWFkZXJQcm9wZXJ0eSJ9XX19")), "singleHeader") unless @single_header.nil?
  @uri_path = uri_path
  Jsii::Type.check_type(@uri_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "uriPath") unless @uri_path.nil?
end

Instance Attribute Details

#methodString? (readonly)

Redacts the HTTP method from WAF logs.



853
854
855
# File 'observability_admin/cfn_telemetry_rule.rb', line 853

def method
  @method
end

#query_stringString? (readonly)

Redacts the entire query string from WAF logs.



858
859
860
# File 'observability_admin/cfn_telemetry_rule.rb', line 858

def query_string
  @query_string
end

#single_headerAWSCDK::IResolvable, ... (readonly)

Redacts a specific header field by name from WAF logs.



863
864
865
# File 'observability_admin/cfn_telemetry_rule.rb', line 863

def single_header
  @single_header
end

#uri_pathString? (readonly)

Redacts the URI path from WAF logs.



868
869
870
# File 'observability_admin/cfn_telemetry_rule.rb', line 868

def uri_path
  @uri_path
end

Class Method Details

.jsii_propertiesObject



870
871
872
873
874
875
876
877
# File 'observability_admin/cfn_telemetry_rule.rb', line 870

def self.jsii_properties
  {
    :method => "method",
    :query_string => "queryString",
    :single_header => "singleHeader",
    :uri_path => "uriPath",
  }
end

Instance Method Details

#to_jsiiObject



879
880
881
882
883
884
885
886
887
888
# File 'observability_admin/cfn_telemetry_rule.rb', line 879

def to_jsii
  result = {}
  result.merge!({
    "method" => @method,
    "queryString" => @query_string,
    "singleHeader" => @single_header,
    "uriPath" => @uri_path,
  })
  result.compact
end