observation_sources
Creates, updates, deletes, gets or lists an observation_sources
resource.
Overview
Name | observation_sources |
Type | Resource |
Id | google.apim.observation_sources |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. name of resource For MVP, each region can only have 1 source. |
createTime | string (google-datetime) | Output only. [Output only] Create time stamp |
gclbObservationSource | object | The GCLB observation source (id: GclbObservationSource) |
state | string | Output only. The observation source state |
updateTime | string (google-datetime) | Output only. [Output only] Update time stamp |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. name of resource For MVP, each region can only have 1 source. |
createTime | string (google-datetime) | Output only. [Output only] Create time stamp |
gclbObservationSource | object | The GCLB observation source (id: GclbObservationSource) |
state | string | Output only. The observation source state |
updateTime | string (google-datetime) | Output only. [Output only] Update time stamp |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , observationSourcesId | GetObservationSource retrieves a single ObservationSource by name. | |
list | select | projectsId , locationsId | pageSize , pageToken | ListObservationSources gets all ObservationSources for a given project and location. |
create | insert | projectsId , locationsId | observationSourceId , requestId | CreateObservationSource creates a new ObservationSource but does not affect any deployed infrastructure. It is a configuration that can be used in an Observation Job to collect data about APIs running in user's dataplane. |
delete | delete | projectsId , locationsId , observationSourcesId | DeleteObservationSource deletes an observation source. This method will fail if the observation source is currently being used by any ObservationJob, even if not enabled. |
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 |
---|---|---|
locationsId | string | |
observationSourcesId | string | |
projectsId | string | |
observationSourceId | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string |
SELECT
examples
- get
- list
GetObservationSource retrieves a single ObservationSource by name.
SELECT
name,
createTime,
gclbObservationSource,
state,
updateTime
FROM google.apim.observation_sources
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND observationSourcesId = '{{ observationSourcesId }}' -- required;
ListObservationSources gets all ObservationSources for a given project and location.
SELECT
name,
createTime,
gclbObservationSource,
state,
updateTime
FROM google.apim.observation_sources
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- create
- Manifest
CreateObservationSource creates a new ObservationSource but does not affect any deployed infrastructure. It is a configuration that can be used in an Observation Job to collect data about APIs running in user's dataplane.
INSERT INTO google.apim.observation_sources (
data__gclbObservationSource,
data__name,
projectsId,
locationsId,
observationSourceId,
requestId
)
SELECT
'{{ gclbObservationSource }}',
'{{ name }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ observationSourceId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: observation_sources
props:
- name: projectsId
value: string
description: Required parameter for the observation_sources resource.
- name: locationsId
value: string
description: Required parameter for the observation_sources resource.
- name: gclbObservationSource
value: object
description: >
The GCLB observation source
- name: name
value: string
description: >
Identifier. name of resource For MVP, each region can only have 1 source.
- name: observationSourceId
value: string
- name: requestId
value: string
DELETE
examples
- delete
DeleteObservationSource deletes an observation source. This method will fail if the observation source is currently being used by any ObservationJob, even if not enabled.
DELETE FROM google.apim.observation_sources
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND observationSourcesId = '{{ observationSourcesId }}' --required;