---
title: "PATCH /v3/{+name}"
method: PATCH
path: "/v3/{+name}"
tags: ["services"]
---

# PATCH /v3/{+name}

`PATCH /v3/{+name}`

Update the given ServiceLevelObjective.

## Path parameters

- `name` string, required

## Query parameters

- `updateMask` string

## Request body

- ServiceLevelObjective — A Service-Level Objective (SLO) describes a level of desired good service. It consists of a service-level indicator (SLI), a performance goal, and a period over which the objective is to be evaluated against that goal. The SLO can use SLIs defined in a number of different manners. Typical SLOs might include "99% of requests in each rolling week have latency below 200 milliseconds" or "99.5% of requests in each calendar month return successfully."
  - `name` string — Identifier. Resource name for this ServiceLevelObjective. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
  - `displayName` string — Name used for UI elements listing this SLO.
  - `userLabels` object — Labels which have been used to annotate the service-level objective. Label keys must start with a letter. Label keys and values may contain lowercase letters, numbers, underscores, and dashes. Label keys and values have a maximum length of 63 characters, and must be less than 128 bytes in size. Up to 64 label entries may be stored. For labels which do not have a semantic value, the empty string may be supplied for the label value.
  - `calendarPeriod` 'CALENDAR_PERIOD_UNSPECIFIED' | 'DAY' | 'WEEK' | 'FORTNIGHT' | 'MONTH' | 'QUARTER' | 'HALF' | 'YEAR' — A calendar period, semantically "since the start of the current ". At this time, only DAY, WEEK, FORTNIGHT, and MONTH are supported.
  - `rollingPeriod` string, google-duration — A rolling time period, semantically "in the past ". Must be an integer multiple of 1 day no larger than 30 days.
  - `goal` number, double — The fraction of service that must be good in order for this objective to be met. 0 < goal <= 0.9999.
  - `serviceLevelIndicator` ServiceLevelIndicator — A Service-Level Indicator (SLI) describes the "performance" of a service. For some services, the SLI is well-defined. In such cases, the SLI can be described easily by referencing the well-known SLI and providing the needed parameters. Alternatively, a "custom" SLI can be defined with a query to the underlying metric store. An SLI is defined to be good_service / total_service over any queried time interval. The value of performance always falls into the range 0 <= performance <= 1. A custom SLI describes how to compute this ratio, whether this is by dividing values from a pair of time series, cutting a Distribution into good and bad counts, or counting time windows in which the service complies with a criterion. For separation of concerns, a single Service-Level Indicator measures performance for only one aspect of service quality, such as fraction of successful queries or fast-enough queries.
    - `basicSli` BasicSli — An SLI measuring performance on a well-known service type. Performance will be computed on the basis of pre-defined metrics. The type of the service_resource determines the metrics to use and the service_resource.labels and metric_labels are used to construct a monitoring filter to filter that metric down to just the data relevant to this service.
      - `location` string[] — OPTIONAL: The set of locations to which this SLI is relevant. Telemetry from other locations will not be used to calculate performance for this SLI. If omitted, this SLI applies to all locations in which the Service has activity. For service types that don't support breaking down by location, setting this field will result in an error.
      - `version` string[] — OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry from other API versions will not be used to calculate performance for this SLI. If omitted, this SLI applies to all API versions. For service types that don't support breaking down by version, setting this field will result in an error.
      - `method` string[] — OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from other methods will not be used to calculate performance for this SLI. If omitted, this SLI applies to all the Service's methods. For service types that don't support breaking down by method, setting this field will result in an error.
      - `availability` AvailabilityCriteria — Future parameters for the availability SLI.
      - `latency` LatencyCriteria — Parameters for a latency threshold SLI.
        - `threshold` string, google-duration — Good service is defined to be the count of requests made to this service that return in no more than threshold.
    - `requestBased` RequestBasedSli — Service Level Indicators for which atomic units of service are counted directly.
      - `goodTotalRatio` TimeSeriesRatio — A TimeSeriesRatio specifies two TimeSeries to use for computing the good_service / total_service ratio. The specified TimeSeries must have ValueType = DOUBLE or ValueType = INT64 and must have MetricKind = DELTA or MetricKind = CUMULATIVE. The TimeSeriesRatio must specify exactly two of good, bad, and total, and the relationship good_service + bad_service = total_service will be assumed.
        - `totalServiceFilter` string — A monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) specifying a TimeSeries quantifying total demanded service. Must have ValueType = DOUBLE or ValueType = INT64 and must have MetricKind = DELTA or MetricKind = CUMULATIVE.
        - `goodServiceFilter` string — A monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) specifying a TimeSeries quantifying good service provided. Must have ValueType = DOUBLE or ValueType = INT64 and must have MetricKind = DELTA or MetricKind = CUMULATIVE.
        - `badServiceFilter` string — A monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) specifying a TimeSeries quantifying bad service, either demanded service that was not provided or demanded service that was of inadequate quality. Must have ValueType = DOUBLE or ValueType = INT64 and must have MetricKind = DELTA or MetricKind = CUMULATIVE.
      - `distributionCut` DistributionCut — A DistributionCut defines a TimeSeries and thresholds used for measuring good service and total service. The TimeSeries must have ValueType = DISTRIBUTION and MetricKind = DELTA or MetricKind = CUMULATIVE. The computed good_service will be the estimated count of values in the Distribution that fall within the specified min and max.
        - `range` GoogleMonitoringV3Range — Range of numerical values within min and max.
          - `max` number, double — Range maximum.
          - `min` number, double — Range minimum.
        - `distributionFilter` string — A monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) specifying a TimeSeries aggregating values. Must have ValueType = DISTRIBUTION and MetricKind = DELTA or MetricKind = CUMULATIVE.
    - `windowsBased` WindowsBasedSli — A WindowsBasedSli defines good_service as the count of time windows for which the provided service was of good quality. Criteria for determining if service was good are embedded in the window_criterion.
      - `goodTotalRatioThreshold` PerformanceThreshold — A PerformanceThreshold is used when each window is good when that window has a sufficiently high performance.
        - `performance` RequestBasedSli — Service Level Indicators for which atomic units of service are counted directly.
          - `goodTotalRatio` TimeSeriesRatio — A TimeSeriesRatio specifies two TimeSeries to use for computing the good_service / total_service ratio. The specified TimeSeries must have ValueType = DOUBLE or ValueType = INT64 and must have MetricKind = DELTA or MetricKind = CUMULATIVE. The TimeSeriesRatio must specify exactly two of good, bad, and total, and the relationship good_service + bad_service = total_service will be assumed.
            - `totalServiceFilter` string — A monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) specifying a TimeSeries quantifying total demanded service. Must have ValueType = DOUBLE or ValueType = INT64 and must have MetricKind = DELTA or MetricKind = CUMULATIVE.
            - `goodServiceFilter` string — A monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) specifying a TimeSeries quantifying good service provided. Must have ValueType = DOUBLE or ValueType = INT64 and must have MetricKind = DELTA or MetricKind = CUMULATIVE.
            - `badServiceFilter` string — A monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) specifying a TimeSeries quantifying bad service, either demanded service that was not provided or demanded service that was of inadequate quality. Must have ValueType = DOUBLE or ValueType = INT64 and must have MetricKind = DELTA or MetricKind = CUMULATIVE.
          - `distributionCut` DistributionCut — A DistributionCut defines a TimeSeries and thresholds used for measuring good service and total service. The TimeSeries must have ValueType = DISTRIBUTION and MetricKind = DELTA or MetricKind = CUMULATIVE. The computed good_service will be the estimated count of values in the Distribution that fall within the specified min and max.
            - `range` GoogleMonitoringV3Range — Range of numerical values within min and max.
              - …
            - `distributionFilter` string — A monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) specifying a TimeSeries aggregating values. Must have ValueType = DISTRIBUTION and MetricKind = DELTA or MetricKind = CUMULATIVE.
        - `threshold` number, double — If window performance >= threshold, the window is counted as good.
        - `basicSliPerformance` BasicSli — An SLI measuring performance on a well-known service type. Performance will be computed on the basis of pre-defined metrics. The type of the service_resource determines the metrics to use and the service_resource.labels and metric_labels are used to construct a monitoring filter to filter that metric down to just the data relevant to this service.
          - `location` string[] — OPTIONAL: The set of locations to which this SLI is relevant. Telemetry from other locations will not be used to calculate performance for this SLI. If omitted, this SLI applies to all locations in which the Service has activity. For service types that don't support breaking down by location, setting this field will result in an error.
          - `version` string[] — OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry from other API versions will not be used to calculate performance for this SLI. If omitted, this SLI applies to all API versions. For service types that don't support breaking down by version, setting this field will result in an error.
          - `method` string[] — OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from other methods will not be used to calculate performance for this SLI. If omitted, this SLI applies to all the Service's methods. For service types that don't support breaking down by method, setting this field will result in an error.
          - `availability` AvailabilityCriteria — Future parameters for the availability SLI.
          - `latency` LatencyCriteria — Parameters for a latency threshold SLI.
            - `threshold` string, google-duration — Good service is defined to be the count of requests made to this service that return in no more than threshold.
      - `goodBadMetricFilter` string — A monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) specifying a TimeSeries with ValueType = BOOL. The window is good if any true values appear in the window.
      - `metricMeanInRange` MetricRange — A MetricRange is used when each window is good when the value x of a single TimeSeries satisfies range.min <= x <= range.max. The provided TimeSeries must have ValueType = INT64 or ValueType = DOUBLE and MetricKind = GAUGE.
        - `timeSeries` string — A monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) specifying the TimeSeries to use for evaluating window quality.
        - `range` GoogleMonitoringV3Range — Range of numerical values within min and max.
          - `max` number, double — Range maximum.
          - `min` number, double — Range minimum.
      - `metricSumInRange` MetricRange — A MetricRange is used when each window is good when the value x of a single TimeSeries satisfies range.min <= x <= range.max. The provided TimeSeries must have ValueType = INT64 or ValueType = DOUBLE and MetricKind = GAUGE.
        - `timeSeries` string — A monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) specifying the TimeSeries to use for evaluating window quality.
        - `range` GoogleMonitoringV3Range — Range of numerical values within min and max.
          - `max` number, double — Range maximum.
          - `min` number, double — Range minimum.
      - `windowPeriod` string, google-duration — Duration over which window quality is evaluated. Must be an integer fraction of a day and at least 60s.

## Response `200`

Successful response

---

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