Cloud Monitoring V3 API - Class Google::Cloud::Monitoring::V3::ServiceLevelObjective (v1.7.0)

Reference documentation and code samples for the Cloud Monitoring V3 API class Google::Cloud::Monitoring::V3::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."

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#calendar_period

defcalendar_period()->::Google::Type::CalendarPeriod
Returns
  • (::Google::Type::CalendarPeriod) — A calendar period, semantically "since the start of the current <calendar_period>". At this time, only DAY, WEEK, FORTNIGHT, and MONTH are supported.

    Note: The following fields are mutually exclusive: calendar_period, rolling_period. If a field in that set is populated, all other fields in the set will automatically be cleared.

#calendar_period=

defcalendar_period=(value)->::Google::Type::CalendarPeriod
Parameter
  • value (::Google::Type::CalendarPeriod) — A calendar period, semantically "since the start of the current <calendar_period>". At this time, only DAY, WEEK, FORTNIGHT, and MONTH are supported.

    Note: The following fields are mutually exclusive: calendar_period, rolling_period. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Type::CalendarPeriod) — A calendar period, semantically "since the start of the current <calendar_period>". At this time, only DAY, WEEK, FORTNIGHT, and MONTH are supported.

    Note: The following fields are mutually exclusive: calendar_period, rolling_period. If a field in that set is populated, all other fields in the set will automatically be cleared.

#display_name

defdisplay_name()->::String
Returns
  • (::String) — Name used for UI elements listing this SLO.

#display_name=

defdisplay_name=(value)->::String
Parameter
  • value (::String) — Name used for UI elements listing this SLO.
Returns
  • (::String) — Name used for UI elements listing this SLO.

#goal

defgoal()->::Float
Returns
  • (::Float) — The fraction of service that must be good in order for this objective to be met. 0 < goal <= 0.9999.

#goal=

defgoal=(value)->::Float
Parameter
  • value (::Float) — The fraction of service that must be good in order for this objective to be met. 0 < goal <= 0.9999.
Returns
  • (::Float) — The fraction of service that must be good in order for this objective to be met. 0 < goal <= 0.9999.

#name

defname()->::String
Returns
  • (::String) —

    Identifier. Resource name for this ServiceLevelObjective. The format is:

    projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
    

#name=

defname=(value)->::String
Parameter
  • value (::String) —

    Identifier. Resource name for this ServiceLevelObjective. The format is:

    projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
    
Returns
  • (::String) —

    Identifier. Resource name for this ServiceLevelObjective. The format is:

    projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
    

#rolling_period

defrolling_period()->::Google::Protobuf::Duration
Returns
  • (::Google::Protobuf::Duration) — A rolling time period, semantically "in the past <rolling_period>". Must be an integer multiple of 1 day no larger than 30 days.

    Note: The following fields are mutually exclusive: rolling_period, calendar_period. If a field in that set is populated, all other fields in the set will automatically be cleared.

#rolling_period=

defrolling_period=(value)->::Google::Protobuf::Duration
Parameter
  • value (::Google::Protobuf::Duration) — A rolling time period, semantically "in the past <rolling_period>". Must be an integer multiple of 1 day no larger than 30 days.

    Note: The following fields are mutually exclusive: rolling_period, calendar_period. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Protobuf::Duration) — A rolling time period, semantically "in the past <rolling_period>". Must be an integer multiple of 1 day no larger than 30 days.

    Note: The following fields are mutually exclusive: rolling_period, calendar_period. If a field in that set is populated, all other fields in the set will automatically be cleared.

#service_level_indicator

defservice_level_indicator()->::Google::Cloud::Monitoring::V3::ServiceLevelIndicator
Returns

#service_level_indicator=

defservice_level_indicator=(value)->::Google::Cloud::Monitoring::V3::ServiceLevelIndicator
Parameter
Returns

#user_labels

defuser_labels()->::Google::Protobuf::Map{::String=>::String}
Returns
  • (::Google::Protobuf::Map{::String => ::String}) — 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.

#user_labels=

defuser_labels=(value)->::Google::Protobuf::Map{::String=>::String}
Parameter
  • value (::Google::Protobuf::Map{::String => ::String}) — 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.
Returns
  • (::Google::Protobuf::Map{::String => ::String}) — 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.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.