Skip to main content

service_level_objectives

Creates, updates, deletes, gets or lists a service_level_objectives resource.

Overview​

Nameservice_level_objectives
TypeResource
Idgoogle.monitoring.service_level_objectives

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. Resource name for this ServiceLevelObjective. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
calendarPeriodstringA calendar period, semantically "since the start of the current ". At this time, only DAY, WEEK, FORTNIGHT, and MONTH are supported. (CALENDAR_PERIOD_UNSPECIFIED, DAY, WEEK, FORTNIGHT, MONTH, QUARTER, HALF, YEAR)
displayNamestringName used for UI elements listing this SLO.
goalnumber (double)The fraction of service that must be good in order for this objective to be met. 0 < goal <= 0.9999.
rollingPeriodstring (google-duration)A rolling time period, semantically "in the past ". Must be an integer multiple of 1 day no larger than 30 days.
serviceLevelIndicatorobjectThe definition of good service, used to measure and calculate the quality of the Service's performance with respect to a single aspect of service quality. (id: ServiceLevelIndicator)
userLabelsobjectLabels 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.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
services_service_level_objectives_listselectparentType, parentfilter, pageSize, pageToken, viewList the ServiceLevelObjectives for the given Service.
services_service_level_objectives_createinsertparentType, parentserviceLevelObjectiveIdCreate a ServiceLevelObjective for the given Service.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
parentstring
parentTypestring
filterstring
pageSizeinteger (int32)
pageTokenstring
serviceLevelObjectiveIdstring
viewstring

SELECT examples​

List the ServiceLevelObjectives for the given Service.

SELECT
name,
calendarPeriod,
displayName,
goal,
rollingPeriod,
serviceLevelIndicator,
userLabels
FROM google.monitoring.service_level_objectives
WHERE parentType = '{{ parentType }}' -- required
AND parent = '{{ parent }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND view = '{{ view }}'
;

INSERT examples​

Create a ServiceLevelObjective for the given Service.

INSERT INTO google.monitoring.service_level_objectives (
data__calendarPeriod,
data__displayName,
data__goal,
data__name,
data__rollingPeriod,
data__serviceLevelIndicator,
data__userLabels,
parentType,
parent,
serviceLevelObjectiveId
)
SELECT
'{{ calendarPeriod }}',
'{{ displayName }}',
{{ goal }},
'{{ name }}',
'{{ rollingPeriod }}',
'{{ serviceLevelIndicator }}',
'{{ userLabels }}',
'{{ parentType }}',
'{{ parent }}',
'{{ serviceLevelObjectiveId }}'
RETURNING
name,
calendarPeriod,
displayName,
goal,
rollingPeriod,
serviceLevelIndicator,
userLabels
;