service_level_objectives
Creates, updates, deletes, gets or lists a service_level_objectives
resource.
Overview
Name | service_level_objectives |
Type | Resource |
Id | google.monitoring.service_level_objectives |
Fields
The following fields are returned by SELECT
queries:
- services_service_level_objectives_list
- services_service_level_objectives_get
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Resource name for this ServiceLevelObjective. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] |
calendarPeriod | string | A calendar period, semantically "since the start of the current ". At this time, only DAY, WEEK, FORTNIGHT, and MONTH are supported. |
displayName | string | Name used for UI elements listing this SLO. |
goal | number (double) | The fraction of service that must be good in order for this objective to be met. 0 < goal <= 0.9999. |
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. |
serviceLevelIndicator | object | The 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) |
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. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Resource name for this ServiceLevelObjective. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] |
calendarPeriod | string | A calendar period, semantically "since the start of the current ". At this time, only DAY, WEEK, FORTNIGHT, and MONTH are supported. |
displayName | string | Name used for UI elements listing this SLO. |
goal | number (double) | The fraction of service that must be good in order for this objective to be met. 0 < goal <= 0.9999. |
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. |
serviceLevelIndicator | object | The 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) |
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. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
services_service_level_objectives_list | select | parentType , parent | filter , pageSize , pageToken , view | List the ServiceLevelObjectives for the given Service. |
services_service_level_objectives_get | select | name | view | Get a ServiceLevelObjective by name. |
services_service_level_objectives_create | insert | parentType , parent | serviceLevelObjectiveId | Create a ServiceLevelObjective for the given Service. |
services_service_level_objectives_patch | update | name | updateMask | Update the given ServiceLevelObjective. |
services_service_level_objectives_delete | delete | name | Delete the given ServiceLevelObjective. |
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.
Name | Datatype | Description |
---|---|---|
name | string | |
parent | string | |
parentType | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
serviceLevelObjectiveId | string | |
updateMask | string (google-fieldmask) | |
view | string |
SELECT
examples
- services_service_level_objectives_list
- services_service_level_objectives_get
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 }}';
Get a ServiceLevelObjective by name.
SELECT
name,
calendarPeriod,
displayName,
goal,
rollingPeriod,
serviceLevelIndicator,
userLabels
FROM google.monitoring.service_level_objectives
WHERE name = '{{ name }}' -- required
AND view = '{{ view }}';
INSERT
examples
- services_service_level_objectives_create
- Manifest
Create a ServiceLevelObjective for the given Service.
INSERT INTO google.monitoring.service_level_objectives (
data__name,
data__displayName,
data__serviceLevelIndicator,
data__goal,
data__rollingPeriod,
data__calendarPeriod,
data__userLabels,
parentType,
parent,
serviceLevelObjectiveId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ serviceLevelIndicator }}',
{{ goal }},
'{{ rollingPeriod }}',
'{{ calendarPeriod }}',
'{{ userLabels }}',
'{{ parentType }}',
'{{ parent }}',
'{{ serviceLevelObjectiveId }}'
RETURNING
name,
calendarPeriod,
displayName,
goal,
rollingPeriod,
serviceLevelIndicator,
userLabels
;
# Description fields are for documentation purposes
- name: service_level_objectives
props:
- name: parentType
value: string
description: Required parameter for the service_level_objectives resource.
- name: parent
value: string
description: Required parameter for the service_level_objectives resource.
- name: name
value: string
description: >
Identifier. Resource name for this ServiceLevelObjective. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
- name: displayName
value: string
description: >
Name used for UI elements listing this SLO.
- name: serviceLevelIndicator
value: object
description: >
The 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.
- name: goal
value: number
description: >
The fraction of service that must be good in order for this objective to be met. 0 < goal <= 0.9999.
- name: rollingPeriod
value: string
description: >
A rolling time period, semantically "in the past ". Must be an integer multiple of 1 day no larger than 30 days.
- name: calendarPeriod
value: string
description: >
A calendar period, semantically "since the start of the current ". At this time, only DAY, WEEK, FORTNIGHT, and MONTH are supported.
valid_values: ['CALENDAR_PERIOD_UNSPECIFIED', 'DAY', 'WEEK', 'FORTNIGHT', 'MONTH', 'QUARTER', 'HALF', 'YEAR']
- name: userLabels
value: object
description: >
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.
- name: serviceLevelObjectiveId
value: string
UPDATE
examples
- services_service_level_objectives_patch
Update the given ServiceLevelObjective.
UPDATE google.monitoring.service_level_objectives
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__serviceLevelIndicator = '{{ serviceLevelIndicator }}',
data__goal = {{ goal }},
data__rollingPeriod = '{{ rollingPeriod }}',
data__calendarPeriod = '{{ calendarPeriod }}',
data__userLabels = '{{ userLabels }}'
WHERE
name = '{{ name }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
calendarPeriod,
displayName,
goal,
rollingPeriod,
serviceLevelIndicator,
userLabels;
DELETE
examples
- services_service_level_objectives_delete
Delete the given ServiceLevelObjective.
DELETE FROM google.monitoring.service_level_objectives
WHERE name = '{{ name }}' --required;