Class: Google::Cloud::Monitoring::V3::UptimeCheckConfig::ContentMatcher
- Inherits:
-
Object
- Object
- Google::Cloud::Monitoring::V3::UptimeCheckConfig::ContentMatcher
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/monitoring/v3/uptime.rb
Overview
Optional. Used to perform content matching. This allows matching based on substrings and regular expressions, together with their negations. Only the first 4 MB of an HTTP or HTTPS check's response (and the first 1 MB of a TCP check's response) are examined for purposes of content matching.
Defined Under Namespace
Modules: ContentMatcherOption Classes: JsonPathMatcher
Instance Attribute Summary collapse
-
#content ⇒ ::String
String, regex or JSON content to match.
-
#json_path_matcher ⇒ ::Google::Cloud::Monitoring::V3::UptimeCheckConfig::ContentMatcher::JsonPathMatcher
Matcher information for
MATCHES_JSON_PATH
andNOT_MATCHES_JSON_PATH
. -
#matcher ⇒ ::Google::Cloud::Monitoring::V3::UptimeCheckConfig::ContentMatcher::ContentMatcherOption
The type of content matcher that will be applied to the server output, compared to the
content
string when the check is run.
Instance Attribute Details
#content ⇒ ::String
Returns String, regex or JSON content to match. Maximum 1024 bytes. An empty
content
string indicates no content matching is to be performed.
471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 |
# File 'proto_docs/google/monitoring/v3/uptime.rb', line 471 class ContentMatcher include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Information needed to perform a JSONPath content match. # Used for `ContentMatcherOption::MATCHES_JSON_PATH` and # `ContentMatcherOption::NOT_MATCHES_JSON_PATH`. # @!attribute [rw] json_path # @return [::String] # JSONPath within the response output pointing to the expected # `ContentMatcher::content` to match against. # @!attribute [rw] json_matcher # @return [::Google::Cloud::Monitoring::V3::UptimeCheckConfig::ContentMatcher::JsonPathMatcher::JsonPathMatcherOption] # The type of JSONPath match that will be applied to the JSON output # (`ContentMatcher.content`) class JsonPathMatcher include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Options to perform JSONPath content matching. module JsonPathMatcherOption # No JSONPath matcher type specified (not valid). JSON_PATH_MATCHER_OPTION_UNSPECIFIED = 0 # Selects 'exact string' matching. The match succeeds if the content at # the `json_path` within the output is exactly the same as the # `content` string. EXACT_MATCH = 1 # Selects regular-expression matching. The match succeeds if the # content at the `json_path` within the output matches the regular # expression specified in the `content` string. REGEX_MATCH = 2 end end # Options to perform content matching. module ContentMatcherOption # No content matcher type specified (maintained for backward # compatibility, but deprecated for future use). # Treated as `CONTAINS_STRING`. CONTENT_MATCHER_OPTION_UNSPECIFIED = 0 # Selects substring matching. The match succeeds if the output contains # the `content` string. This is the default value for checks without # a `matcher` option, or where the value of `matcher` is # `CONTENT_MATCHER_OPTION_UNSPECIFIED`. CONTAINS_STRING = 1 # Selects negation of substring matching. The match succeeds if the # output does _NOT_ contain the `content` string. NOT_CONTAINS_STRING = 2 # Selects regular-expression matching. The match succeeds if the output # matches the regular expression specified in the `content` string. # Regex matching is only supported for HTTP/HTTPS checks. MATCHES_REGEX = 3 # Selects negation of regular-expression matching. The match succeeds if # the output does _NOT_ match the regular expression specified in the # `content` string. Regex matching is only supported for HTTP/HTTPS # checks. NOT_MATCHES_REGEX = 4 # Selects JSONPath matching. See `JsonPathMatcher` for details on when # the match succeeds. JSONPath matching is only supported for HTTP/HTTPS # checks. MATCHES_JSON_PATH = 5 # Selects JSONPath matching. See `JsonPathMatcher` for details on when # the match succeeds. Succeeds when output does _NOT_ match as specified. # JSONPath is only supported for HTTP/HTTPS checks. NOT_MATCHES_JSON_PATH = 6 end end |
#json_path_matcher ⇒ ::Google::Cloud::Monitoring::V3::UptimeCheckConfig::ContentMatcher::JsonPathMatcher
Returns Matcher information for MATCHES_JSON_PATH
and NOT_MATCHES_JSON_PATH
.
471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 |
# File 'proto_docs/google/monitoring/v3/uptime.rb', line 471 class ContentMatcher include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Information needed to perform a JSONPath content match. # Used for `ContentMatcherOption::MATCHES_JSON_PATH` and # `ContentMatcherOption::NOT_MATCHES_JSON_PATH`. # @!attribute [rw] json_path # @return [::String] # JSONPath within the response output pointing to the expected # `ContentMatcher::content` to match against. # @!attribute [rw] json_matcher # @return [::Google::Cloud::Monitoring::V3::UptimeCheckConfig::ContentMatcher::JsonPathMatcher::JsonPathMatcherOption] # The type of JSONPath match that will be applied to the JSON output # (`ContentMatcher.content`) class JsonPathMatcher include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Options to perform JSONPath content matching. module JsonPathMatcherOption # No JSONPath matcher type specified (not valid). JSON_PATH_MATCHER_OPTION_UNSPECIFIED = 0 # Selects 'exact string' matching. The match succeeds if the content at # the `json_path` within the output is exactly the same as the # `content` string. EXACT_MATCH = 1 # Selects regular-expression matching. The match succeeds if the # content at the `json_path` within the output matches the regular # expression specified in the `content` string. REGEX_MATCH = 2 end end # Options to perform content matching. module ContentMatcherOption # No content matcher type specified (maintained for backward # compatibility, but deprecated for future use). # Treated as `CONTAINS_STRING`. CONTENT_MATCHER_OPTION_UNSPECIFIED = 0 # Selects substring matching. The match succeeds if the output contains # the `content` string. This is the default value for checks without # a `matcher` option, or where the value of `matcher` is # `CONTENT_MATCHER_OPTION_UNSPECIFIED`. CONTAINS_STRING = 1 # Selects negation of substring matching. The match succeeds if the # output does _NOT_ contain the `content` string. NOT_CONTAINS_STRING = 2 # Selects regular-expression matching. The match succeeds if the output # matches the regular expression specified in the `content` string. # Regex matching is only supported for HTTP/HTTPS checks. MATCHES_REGEX = 3 # Selects negation of regular-expression matching. The match succeeds if # the output does _NOT_ match the regular expression specified in the # `content` string. Regex matching is only supported for HTTP/HTTPS # checks. NOT_MATCHES_REGEX = 4 # Selects JSONPath matching. See `JsonPathMatcher` for details on when # the match succeeds. JSONPath matching is only supported for HTTP/HTTPS # checks. MATCHES_JSON_PATH = 5 # Selects JSONPath matching. See `JsonPathMatcher` for details on when # the match succeeds. Succeeds when output does _NOT_ match as specified. # JSONPath is only supported for HTTP/HTTPS checks. NOT_MATCHES_JSON_PATH = 6 end end |
#matcher ⇒ ::Google::Cloud::Monitoring::V3::UptimeCheckConfig::ContentMatcher::ContentMatcherOption
Returns The type of content matcher that will be applied to the server output,
compared to the content
string when the check is run.
471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 |
# File 'proto_docs/google/monitoring/v3/uptime.rb', line 471 class ContentMatcher include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Information needed to perform a JSONPath content match. # Used for `ContentMatcherOption::MATCHES_JSON_PATH` and # `ContentMatcherOption::NOT_MATCHES_JSON_PATH`. # @!attribute [rw] json_path # @return [::String] # JSONPath within the response output pointing to the expected # `ContentMatcher::content` to match against. # @!attribute [rw] json_matcher # @return [::Google::Cloud::Monitoring::V3::UptimeCheckConfig::ContentMatcher::JsonPathMatcher::JsonPathMatcherOption] # The type of JSONPath match that will be applied to the JSON output # (`ContentMatcher.content`) class JsonPathMatcher include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Options to perform JSONPath content matching. module JsonPathMatcherOption # No JSONPath matcher type specified (not valid). JSON_PATH_MATCHER_OPTION_UNSPECIFIED = 0 # Selects 'exact string' matching. The match succeeds if the content at # the `json_path` within the output is exactly the same as the # `content` string. EXACT_MATCH = 1 # Selects regular-expression matching. The match succeeds if the # content at the `json_path` within the output matches the regular # expression specified in the `content` string. REGEX_MATCH = 2 end end # Options to perform content matching. module ContentMatcherOption # No content matcher type specified (maintained for backward # compatibility, but deprecated for future use). # Treated as `CONTAINS_STRING`. CONTENT_MATCHER_OPTION_UNSPECIFIED = 0 # Selects substring matching. The match succeeds if the output contains # the `content` string. This is the default value for checks without # a `matcher` option, or where the value of `matcher` is # `CONTENT_MATCHER_OPTION_UNSPECIFIED`. CONTAINS_STRING = 1 # Selects negation of substring matching. The match succeeds if the # output does _NOT_ contain the `content` string. NOT_CONTAINS_STRING = 2 # Selects regular-expression matching. The match succeeds if the output # matches the regular expression specified in the `content` string. # Regex matching is only supported for HTTP/HTTPS checks. MATCHES_REGEX = 3 # Selects negation of regular-expression matching. The match succeeds if # the output does _NOT_ match the regular expression specified in the # `content` string. Regex matching is only supported for HTTP/HTTPS # checks. NOT_MATCHES_REGEX = 4 # Selects JSONPath matching. See `JsonPathMatcher` for details on when # the match succeeds. JSONPath matching is only supported for HTTP/HTTPS # checks. MATCHES_JSON_PATH = 5 # Selects JSONPath matching. See `JsonPathMatcher` for details on when # the match succeeds. Succeeds when output does _NOT_ match as specified. # JSONPath is only supported for HTTP/HTTPS checks. NOT_MATCHES_JSON_PATH = 6 end end |