Update the given ServiceLevelObjective.

Scopes

You will need authorization for at least one of the following scopes to make a valid call:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/monitoring

If unset, the scope for this method defaults to https://www.googleapis.com/auth/cloud-platform. You can set the scope for this method like this: monitoring3 --scope <scope> services service-level-objectives-patch ...

Required Scalar Argument

  • <name> (string)
    • Resource name for this ServiceLevelObjective. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]

Required Request Value

The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.

For example, a structure like this:

ServiceLevelObjective:
  calendar-period: string
  display-name: string
  goal: number
  name: string
  rolling-period: string
  service-level-indicator:
    basic-sli:
      latency:
        threshold: string
      location: [string]
      method: [string]
      version: [string]
    request-based:
      distribution-cut:
        distribution-filter: string
        range:
          max: number
          min: number
      good-total-ratio:
        bad-service-filter: string
        good-service-filter: string
        total-service-filter: string
    windows-based:
      good-bad-metric-filter: string
      good-total-ratio-threshold:
        basic-sli-performance:
          latency:
            threshold: string
          location: [string]
          method: [string]
          version: [string]
        performance:
          distribution-cut:
            distribution-filter: string
            range:
              max: number
              min: number
          good-total-ratio:
            bad-service-filter: string
            good-service-filter: string
            total-service-filter: string
        threshold: number
      metric-mean-in-range:
        range:
          max: number
          min: number
        time-series: string
      metric-sum-in-range:
        range:
          max: number
          min: number
        time-series: string
      window-period: string
  user-labels: { string: string }

can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.

  • -r . calendar-period=ipsum
    • A calendar period, semantically "since the start of the current ". At this time, only DAY, WEEK, FORTNIGHT, and MONTH are supported.
  • display-name=accusam
    • Name used for UI elements listing this SLO.
  • goal=0.6477849337630458
    • The fraction of service that must be good in order for this objective to be met. 0 < goal <= 0.999.
  • name=no
    • Resource name for this ServiceLevelObjective. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
  • rolling-period=justo
    • A rolling time period, semantically "in the past ". Must be an integer multiple of 1 day no larger than 30 days.
  • service-level-indicator.basic-sli.latency threshold=sadipscing

    • Good service is defined to be the count of requests made to this service that return in no more than threshold.
  • .. location=diam

    • 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.
    • Each invocation of this argument appends the given value to the array.
  • method=sea
    • 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.
    • Each invocation of this argument appends the given value to the array.
  • version=ipsum

    • 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.
    • Each invocation of this argument appends the given value to the array.
  • ..request-based.distribution-cut distribution-filter=stet

    • 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.
  • range max=0.3069106321956353
    • Range maximum.
  • min=0.3128221260388019

    • Range minimum.
  • ...good-total-ratio bad-service-filter=kasd

    • 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.
  • good-service-filter=amet
    • 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.
  • total-service-filter=lorem

    • 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.
  • ...windows-based good-bad-metric-filter=justo

    • 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.
  • good-total-ratio-threshold.basic-sli-performance.latency threshold=invidunt

    • Good service is defined to be the count of requests made to this service that return in no more than threshold.
  • .. location=sed

    • 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.
    • Each invocation of this argument appends the given value to the array.
  • method=nonumy
    • 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.
    • Each invocation of this argument appends the given value to the array.
  • version=sea

    • 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.
    • Each invocation of this argument appends the given value to the array.
  • ..performance.distribution-cut distribution-filter=ipsum

    • 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.
  • range max=0.9075939379577609
    • Range maximum.
  • min=0.6302128855856648

    • Range minimum.
  • ...good-total-ratio bad-service-filter=at

    • 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.
  • good-service-filter=erat
    • 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.
  • total-service-filter=clita

    • 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.
  • ... threshold=0.19684676905379073

    • If window performance >= threshold, the window is counted as good.
  • ..metric-mean-in-range.range max=0.07828901826934798

    • Range maximum.
  • min=0.5500428128430022

    • Range minimum.
  • .. time-series=ipsum

    • A monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) specifying the TimeSeries to use for evaluating window quality.
  • ..metric-sum-in-range.range max=0.5774754255685809

    • Range maximum.
  • min=0.2455307612046853

    • Range minimum.
  • .. time-series=elitr

    • A monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) specifying the TimeSeries to use for evaluating window quality.
  • .. window-period=consetetur

    • Duration over which window quality is evaluated. Must be an integer fraction of a day and at least 60s.
  • ... user-labels=key=et

    • 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.
    • the value will be associated with the given key

About Cursors

The cursor position is key to comfortably set complex nested structures. The following rules apply:

  • The cursor position is always set relative to the current one, unless the field name starts with the . character. Fields can be nested such as in -r f.s.o .
  • The cursor position is set relative to the top-level structure if it starts with ., e.g. -r .s.s
  • You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify -r struct.sub_struct=bar.
  • You can move the cursor one level up by using ... Each additional . moves it up one additional level. E.g. ... would go three levels up.

Optional Output Flags

The method's return value a JSON encoded structure, which will be written to standard output by default.

  • -o out
    • out specifies the destination to which to write the server's result to. It will be a JSON-encoded structure. The destination may be - to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.

Optional Method Properties

You may set the following properties to further configure the call. Please note that -p is followed by one or more key-value-pairs, and is called like this -p k1=v1 k2=v2 even though the listing below repeats the -p for completeness.

  • -p update-mask=string
    • A set of field paths defining which fields to use for the update.

Optional General Properties

The following properties can configure any call, and are not specific to this method.

  • -p $-xgafv=string

    • V1 error format.
  • -p access-token=string

    • OAuth access token.
  • -p alt=string

    • Data format for response.
  • -p callback=string

    • JSONP
  • -p fields=string

    • Selector specifying which fields to include in a partial response.
  • -p key=string

    • API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
  • -p oauth-token=string

    • OAuth 2.0 token for the current user.
  • -p pretty-print=boolean

    • Returns response with indentations and line breaks.
  • -p quota-user=string

    • Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
  • -p upload-type=string

    • Legacy upload protocol for media (e.g. "media", "multipart").
  • -p upload-protocol=string

    • Upload protocol for media (e.g. "raw", "multipart").