Reference documentation and code samples for the Cloud Monitoring V3 API class Google::Cloud::Monitoring::V3::UptimeCheckConfig::ContentMatcher.
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.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#content
defcontent()->::String
Returns
(::String) — String, regex or JSON content to match. Maximum 1024 bytes. An empty
content string indicates no content matching is to be performed.
#content=
defcontent=(value)->::String
Parameter
value (::String) — String, regex or JSON content to match. Maximum 1024 bytes. An empty
content string indicates no content matching is to be performed.
Returns
(::String) — String, regex or JSON content to match. Maximum 1024 bytes. An empty
content string indicates no content matching is to be performed.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Monitoring V3 API - Class Google::Cloud::Monitoring::V3::UptimeCheckConfig::ContentMatcher (v1.6.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.6.1 (latest)](/ruby/docs/reference/google-cloud-monitoring-v3/latest/Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher)\n- [1.6.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.6.0/Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher)\n- [1.5.1](/ruby/docs/reference/google-cloud-monitoring-v3/1.5.1/Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher)\n- [1.4.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.4.0/Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher)\n- [1.3.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.3.0/Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher)\n- [1.2.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.2.0/Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher)\n- [1.1.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.1.0/Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher)\n- [1.0.1](/ruby/docs/reference/google-cloud-monitoring-v3/1.0.1/Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher)\n- [0.18.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.18.0/Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher)\n- [0.17.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.17.0/Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher)\n- [0.16.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.16.0/Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher)\n- [0.15.2](/ruby/docs/reference/google-cloud-monitoring-v3/0.15.2/Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher)\n- [0.14.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.14.0/Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher)\n- [0.13.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.13.0/Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher)\n- [0.12.1](/ruby/docs/reference/google-cloud-monitoring-v3/0.12.1/Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher)\n- [0.11.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.11.0/Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher)\n- [0.10.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.10.0/Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher)\n- [0.9.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.9.0/Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher)\n- [0.8.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.8.0/Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher)\n- [0.7.1](/ruby/docs/reference/google-cloud-monitoring-v3/0.7.1/Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher) \nReference documentation and code samples for the Cloud Monitoring V3 API class Google::Cloud::Monitoring::V3::UptimeCheckConfig::ContentMatcher.\n\nOptional. Used to perform content matching. This allows matching based on\nsubstrings and regular expressions, together with their negations. Only the\nfirst 4 MB of an HTTP or HTTPS check's response (and the first\n1 MB of a TCP check's response) are examined for purposes of content\nmatching. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #content\n\n def content() -\u003e ::String\n\n**Returns**\n\n- (::String) --- String, regex or JSON content to match. Maximum 1024 bytes. An empty `content` string indicates no content matching is to be performed.\n\n### #content=\n\n def content=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- String, regex or JSON content to match. Maximum 1024 bytes. An empty `content` string indicates no content matching is to be performed. \n**Returns**\n\n- (::String) --- String, regex or JSON content to match. Maximum 1024 bytes. An empty `content` string indicates no content matching is to be performed.\n\n### #json_path_matcher\n\n def json_path_matcher() -\u003e ::Google::Cloud::Monitoring::V3::UptimeCheckConfig::ContentMatcher::JsonPathMatcher\n\n**Returns**\n\n- ([::Google::Cloud::Monitoring::V3::UptimeCheckConfig::ContentMatcher::JsonPathMatcher](./Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher-JsonPathMatcher)) --- Matcher information for `MATCHES_JSON_PATH` and `NOT_MATCHES_JSON_PATH`\n\n### #json_path_matcher=\n\n def json_path_matcher=(value) -\u003e ::Google::Cloud::Monitoring::V3::UptimeCheckConfig::ContentMatcher::JsonPathMatcher\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Monitoring::V3::UptimeCheckConfig::ContentMatcher::JsonPathMatcher](./Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher-JsonPathMatcher)) --- Matcher information for `MATCHES_JSON_PATH` and `NOT_MATCHES_JSON_PATH` \n**Returns**\n\n- ([::Google::Cloud::Monitoring::V3::UptimeCheckConfig::ContentMatcher::JsonPathMatcher](./Google-Cloud-Monitoring-V3-UptimeCheckConfig-ContentMatcher-JsonPathMatcher)) --- Matcher information for `MATCHES_JSON_PATH` and `NOT_MATCHES_JSON_PATH`\n\n### #matcher\n\n def matcher() -\u003e ::Google::Cloud::Monitoring::V3::UptimeCheckConfig::ContentMatcher::ContentMatcherOption\n\n**Returns**\n\n- ([::Google::Cloud::Monitoring::V3::UptimeCheckConfig::ContentMatcher::ContentMatcherOption](./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.\n\n### #matcher=\n\n def matcher=(value) -\u003e ::Google::Cloud::Monitoring::V3::UptimeCheckConfig::ContentMatcher::ContentMatcherOption\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Monitoring::V3::UptimeCheckConfig::ContentMatcher::ContentMatcherOption](./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. \n**Returns**\n\n- ([::Google::Cloud::Monitoring::V3::UptimeCheckConfig::ContentMatcher::ContentMatcherOption](./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."]]