---
title: "POST /v3/{+parent}/uptimeCheckConfigs"
method: POST
path: "/v3/{+parent}/uptimeCheckConfigs"
tags: ["projects"]
---

# POST /v3/{+parent}/uptimeCheckConfigs

`POST /v3/{+parent}/uptimeCheckConfigs`

Creates a new Uptime check configuration.

## Path parameters

- `parent` string, required

## Request body

- UptimeCheckConfig — This message configures which resources and services to monitor for availability.
  - `contentMatchers` ContentMatcher[] — The content that is expected to appear in the data returned by the target server against which the check is run. Currently, only the first entry in the content_matchers list is supported, and additional entries will be ignored. This field is optional and should only be specified if a content match is required as part of the/ Uptime check.
    - `jsonPathMatcher` JsonPathMatcher — Information needed to perform a JSONPath content match. Used for ContentMatcherOption::MATCHES_JSON_PATH and ContentMatcherOption::NOT_MATCHES_JSON_PATH.
      - `jsonPath` string — JSONPath within the response output pointing to the expected ContentMatcher::content to match against.
      - `jsonMatcher` 'JSON_PATH_MATCHER_OPTION_UNSPECIFIED' | 'EXACT_MATCH' | 'REGEX_MATCH' — The type of JSONPath match that will be applied to the JSON output (ContentMatcher.content)
    - `content` string — String, regex or JSON content to match. Maximum 1024 bytes. An empty content string indicates no content matching is to be performed.
    - `matcher` 'CONTENT_MATCHER_OPTION_UNSPECIFIED' | 'CONTAINS_STRING' | 'NOT_CONTAINS_STRING' | 'MATCHES_REGEX' | 'NOT_MATCHES_REGEX' | 'MATCHES_JSON_PATH' | 'NOT_MATCHES_JSON_PATH' — The type of content matcher that will be applied to the server output, compared to the content string when the check is run.
  - `monitoredResource` MonitoredResource — An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for "gce_instance" has labels "project_id", "instance_id" and "zone": { "type": "gce_instance", "labels": { "project_id": "my-project", "instance_id": "12345678901234", "zone": "us-central1-a" }}
    - `type` string — Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance. For a list of types, see Monitoring resource types (https://cloud.google.com/monitoring/api/resources) and Logging resource types (https://cloud.google.com/logging/docs/api/v2/resource-list).
    - `labels` object — Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels "project_id", "instance_id", and "zone".
  - `resourceGroup` ResourceGroup — The resource submessage for group checks. It can be used instead of a monitored resource, when multiple resources are being monitored.
    - `groupId` string — The group of resources being monitored. Should be only the [GROUP_ID], and not the full-path projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID].
    - `resourceType` 'RESOURCE_TYPE_UNSPECIFIED' | 'INSTANCE' | 'AWS_ELB_LOAD_BALANCER' — The resource type of the group members.
  - `httpCheck` HttpCheck — Information involved in an HTTP/HTTPS Uptime check request.
    - `port` integer — Optional (defaults to 80 when use_ssl is false, and 443 when use_ssl is true). The TCP port on the HTTP server against which to run the check. Will be combined with host (specified within the monitored_resource) and path to construct the full URL.
    - `serviceAgentAuthentication` ServiceAgentAuthentication — Contains information needed for generating either an OpenID Connect token (https://developers.google.com/identity/protocols/OpenIDConnect) or OAuth token (https://developers.google.com/identity/protocols/oauth2). The token will be generated for the Monitoring service agent service account.
      - `type` 'SERVICE_AGENT_AUTHENTICATION_TYPE_UNSPECIFIED' | 'OIDC_TOKEN' — Type of authentication.
    - `body` string, byte — The request body associated with the HTTP POST request. If content_type is URL_ENCODED, the body passed in must be URL-encoded. Users can provide a Content-Length header via the headers field or the API will do so. If the request_method is GET and body is not empty, the API will return an error. The maximum byte size is 1 megabyte.Note: If client libraries aren't used (which performs the conversion automatically) base64 encode your body data since the field is of bytes type.
    - `requestMethod` 'METHOD_UNSPECIFIED' | 'GET' | 'POST' — The HTTP request method to use for the check. If set to METHOD_UNSPECIFIED then request_method defaults to GET.
    - `validateSsl` boolean — Boolean specifying whether to include SSL certificate validation as a part of the Uptime check. Only applies to checks where monitored_resource is set to uptime_url. If use_ssl is false, setting validate_ssl to true has no effect.
    - `maskHeaders` boolean — Boolean specifying whether to encrypt the header information. Encryption should be specified for any headers related to authentication that you do not wish to be seen when retrieving the configuration. The server will be responsible for encrypting the headers. On Get/List calls, if mask_headers is set to true then the headers will be obscured with ******.
    - `pingConfig` PingConfig — Information involved in sending ICMP pings alongside public HTTP/TCP checks. For HTTP, the pings are performed for each part of the redirect chain.
      - `pingsCount` integer — Number of ICMP pings. A maximum of 3 ICMP pings is currently supported.
    - `path` string — Optional (defaults to "/"). The path to the page against which to run the check. Will be combined with the host (specified within the monitored_resource) and port to construct the full URL. If the provided path does not begin with "/", a "/" will be prepended automatically.
    - `authInfo` BasicAuthentication — The authentication parameters to provide to the specified resource or URL that requires a username and password. Currently, only Basic HTTP authentication (https://tools.ietf.org/html/rfc7617) is supported in Uptime checks.
      - `username` string — The username to use when authenticating with the HTTP server.
      - `password` string — The password to use when authenticating with the HTTP server.
    - `contentType` 'TYPE_UNSPECIFIED' | 'URL_ENCODED' | 'USER_PROVIDED' — The content type header to use for the check. The following configurations result in errors: 1. Content type is specified in both the headers field and the content_type field. 2. Request method is GET and content_type is not TYPE_UNSPECIFIED 3. Request method is POST and content_type is TYPE_UNSPECIFIED. 4. Request method is POST and a "Content-Type" header is provided via headers field. The content_type field should be used instead.
    - `customContentType` string — A user provided content type header to use for the check. The invalid configurations outlined in the content_type field apply to custom_content_type, as well as the following: 1. content_type is URL_ENCODED and custom_content_type is set. 2. content_type is USER_PROVIDED and custom_content_type is not set.
    - `acceptedResponseStatusCodes` ResponseStatusCode[] — If present, the check will only pass if the HTTP response status code is in this set of status codes. If empty, the HTTP status code will only pass if the HTTP status code is 200-299.
      - `statusValue` integer — A status code to accept.
      - `statusClass` 'STATUS_CLASS_UNSPECIFIED' | 'STATUS_CLASS_1XX' | 'STATUS_CLASS_2XX' | 'STATUS_CLASS_3XX' | 'STATUS_CLASS_4XX' | 'STATUS_CLASS_5XX' | 'STATUS_CLASS_ANY' — A class of status codes to accept.
    - `headers` object — The list of headers to send as part of the Uptime check request. If two headers have the same key and different values, they should be entered as a single header, with the value being a comma-separated list of all the desired values as described at https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). Entering two separate headers with the same key in a Create call will cause the first to be overwritten by the second. The maximum number of headers allowed is 100.
    - `useSsl` boolean — If true, use HTTPS instead of HTTP to run the check.
  - `selectedRegions` string[] — The list of regions from which the check will be run. Some regions contain one location, and others contain more than one. If this field is specified, enough regions must be provided to include a minimum of 3 locations. Not specifying this field will result in Uptime checks running from all available regions.
  - `tcpCheck` TcpCheck — Information required for a TCP Uptime check request.
    - `port` integer — The TCP port on the server against which to run the check. Will be combined with host (specified within the monitored_resource) to construct the full URL. Required.
    - `pingConfig` PingConfig — Information involved in sending ICMP pings alongside public HTTP/TCP checks. For HTTP, the pings are performed for each part of the redirect chain.
      - `pingsCount` integer — Number of ICMP pings. A maximum of 3 ICMP pings is currently supported.
  - `displayName` string — A human-friendly name for the Uptime check configuration. The display name should be unique within a Cloud Monitoring Workspace in order to make it easier to identify; however, uniqueness is not enforced. Required.
  - `checkerType` 'CHECKER_TYPE_UNSPECIFIED' | 'STATIC_IP_CHECKERS' | 'VPC_CHECKERS' — The type of checkers to use to execute the Uptime check.
  - `period` string, google-duration — How often, in seconds, the Uptime check is performed. Currently, the only supported values are 60s (1 minute), 300s (5 minutes), 600s (10 minutes), and 900s (15 minutes). Optional, defaults to 60s.
  - `userLabels` object — User-supplied key/value data to be used for organizing and identifying the UptimeCheckConfig objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.
  - `isInternal` boolean — If this is true, then checks are made only from the 'internal_checkers'. If it is false, then checks are made only from the 'selected_regions'. It is an error to provide 'selected_regions' when is_internal is true, or to provide 'internal_checkers' when is_internal is false.
  - `disabled` boolean — Whether the check is disabled or not.
  - `syntheticMonitor` SyntheticMonitorTarget — Describes a Synthetic Monitor to be invoked by Uptime.
    - `cloudFunctionV2` CloudFunctionV2Target — A Synthetic Monitor deployed to a Cloud Functions V2 instance.
      - `name` string — Required. Fully qualified GCFv2 resource name i.e. projects/{project}/locations/{location}/functions/{function} Required.
      - `cloudRunRevision` MonitoredResource — An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for "gce_instance" has labels "project_id", "instance_id" and "zone": { "type": "gce_instance", "labels": { "project_id": "my-project", "instance_id": "12345678901234", "zone": "us-central1-a" }}
        - `type` string — Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance. For a list of types, see Monitoring resource types (https://cloud.google.com/monitoring/api/resources) and Logging resource types (https://cloud.google.com/logging/docs/api/v2/resource-list).
        - `labels` object — Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels "project_id", "instance_id", and "zone".
  - `name` string — Identifier. A unique resource name for this Uptime check configuration. The format is: projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] [PROJECT_ID_OR_NUMBER] is the Workspace host project associated with the Uptime check.This field should be omitted when creating the Uptime check configuration; on create, the resource name is assigned by the server and included in the response.
  - `internalCheckers` InternalChecker[] — The internal checkers that this check will egress from. If is_internal is true and this list is empty, the check will egress from all the InternalCheckers configured for the project that owns this UptimeCheckConfig.
    - `gcpZone` string — The GCP zone the Uptime check should egress from. Only respected for internal Uptime checks, where internal_network is specified.
    - `peerProjectId` string — The GCP project ID where the internal checker lives. Not necessary the same as the Metrics Scope project.
    - `state` 'UNSPECIFIED' | 'CREATING' | 'RUNNING' — The current operational state of the internal checker.
    - `network` string — The GCP VPC network (https://cloud.google.com/vpc/docs/vpc) where the internal resource lives (ex: "default").
    - `name` string — A unique resource name for this InternalChecker. The format is: projects/[PROJECT_ID_OR_NUMBER]/internalCheckers/[INTERNAL_CHECKER_ID] [PROJECT_ID_OR_NUMBER] is the Cloud Monitoring Metrics Scope project for the Uptime check config associated with the internal checker.
    - `displayName` string — The checker's human-readable name. The display name should be unique within a Cloud Monitoring Metrics Scope in order to make it easier to identify; however, uniqueness is not enforced.
  - `timeout` string, google-duration — The maximum amount of time to wait for the request to complete (must be between 1 and 60 seconds). Required.
  - `logCheckFailures` boolean — To specify whether to log the results of failed probes to Cloud Logging.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/monitoring.md) · [All operations](https://skmtc.net/google/apis/monitoring/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/monitoring/versions/11ce0f8d9e4c/schema)
