services
Creates, updates, deletes, gets or lists a services
resource.
Overview
Name | services |
Type | Resource |
Id | google.monitoring.services |
Fields
The following fields are returned by SELECT
queries:
- services_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Resource name for this Service. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] |
appEngine | object | Type used for App Engine services. (id: AppEngine) |
basicService | object | Message that contains the service type and service labels of this service if it is a basic service. Documentation and examples here (https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). (id: BasicService) |
cloudEndpoints | object | Type used for Cloud Endpoints services. (id: CloudEndpoints) |
cloudRun | object | Type used for Cloud Run services. (id: CloudRun) |
clusterIstio | object | Type used for Istio services that live in a Kubernetes cluster. (id: ClusterIstio) |
custom | object | Custom service type. (id: Custom) |
displayName | string | Name used for UI elements listing this Service. |
gkeNamespace | object | Type used for GKE Namespaces. (id: GkeNamespace) |
gkeService | object | Type used for GKE Services (the Kubernetes concept of a service). (id: GkeService) |
gkeWorkload | object | Type used for GKE Workloads. (id: GkeWorkload) |
istioCanonicalService | object | Type used for canonical services scoped to an Istio mesh. Metrics for Istio are documented here (https://istio.io/latest/docs/reference/config/metrics/) (id: IstioCanonicalService) |
meshIstio | object | Type used for Istio services scoped to an Istio mesh. (id: MeshIstio) |
telemetry | object | Configuration for how to query telemetry on a Service. (id: Telemetry) |
userLabels | object | Labels which have been used to annotate the service. 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_list | select | parentType , parent | filter , pageSize , pageToken | List Services for this Metrics Scope. |
services_create | insert | parentType , parent | serviceId | Create a 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.
Name | Datatype | Description |
---|---|---|
parent | string | |
parentType | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
serviceId | string |
SELECT
examples
- services_list
List Services for this Metrics Scope.
SELECT
name,
appEngine,
basicService,
cloudEndpoints,
cloudRun,
clusterIstio,
custom,
displayName,
gkeNamespace,
gkeService,
gkeWorkload,
istioCanonicalService,
meshIstio,
telemetry,
userLabels
FROM google.monitoring.services
WHERE parentType = '{{ parentType }}' -- required
AND parent = '{{ parent }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- services_create
- Manifest
Create a Service.
INSERT INTO google.monitoring.services (
data__name,
data__displayName,
data__custom,
data__appEngine,
data__cloudEndpoints,
data__clusterIstio,
data__meshIstio,
data__istioCanonicalService,
data__cloudRun,
data__gkeNamespace,
data__gkeWorkload,
data__gkeService,
data__basicService,
data__telemetry,
data__userLabels,
parentType,
parent,
serviceId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ custom }}',
'{{ appEngine }}',
'{{ cloudEndpoints }}',
'{{ clusterIstio }}',
'{{ meshIstio }}',
'{{ istioCanonicalService }}',
'{{ cloudRun }}',
'{{ gkeNamespace }}',
'{{ gkeWorkload }}',
'{{ gkeService }}',
'{{ basicService }}',
'{{ telemetry }}',
'{{ userLabels }}',
'{{ parentType }}',
'{{ parent }}',
'{{ serviceId }}'
RETURNING
name,
appEngine,
basicService,
cloudEndpoints,
cloudRun,
clusterIstio,
custom,
displayName,
gkeNamespace,
gkeService,
gkeWorkload,
istioCanonicalService,
meshIstio,
telemetry,
userLabels
;
# Description fields are for documentation purposes
- name: services
props:
- name: parentType
value: string
description: Required parameter for the services resource.
- name: parent
value: string
description: Required parameter for the services resource.
- name: name
value: string
description: >
Identifier. Resource name for this Service. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
- name: displayName
value: string
description: >
Name used for UI elements listing this Service.
- name: custom
value: object
description: >
Custom service type.
- name: appEngine
value: object
description: >
Type used for App Engine services.
- name: cloudEndpoints
value: object
description: >
Type used for Cloud Endpoints services.
- name: clusterIstio
value: object
description: >
Type used for Istio services that live in a Kubernetes cluster.
- name: meshIstio
value: object
description: >
Type used for Istio services scoped to an Istio mesh.
- name: istioCanonicalService
value: object
description: >
Type used for canonical services scoped to an Istio mesh. Metrics for Istio are documented here (https://istio.io/latest/docs/reference/config/metrics/)
- name: cloudRun
value: object
description: >
Type used for Cloud Run services.
- name: gkeNamespace
value: object
description: >
Type used for GKE Namespaces.
- name: gkeWorkload
value: object
description: >
Type used for GKE Workloads.
- name: gkeService
value: object
description: >
Type used for GKE Services (the Kubernetes concept of a service).
- name: basicService
value: object
description: >
Message that contains the service type and service labels of this service if it is a basic service. Documentation and examples here (https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli).
- name: telemetry
value: object
description: >
Configuration for how to query telemetry on a Service.
- name: userLabels
value: object
description: >
Labels which have been used to annotate the service. 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: serviceId
value: string