observation_sources
Creates, updates, deletes, gets or lists a observation_sources
resource.
Overview
Name | observation_sources |
Type | Resource |
Id | google.apim.observation_sources |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Identifier. name of resource For MVP, each region can only have 1 source. |
createTime | string | Output only. [Output only] Create time stamp |
gclbObservationSource | object | The GCLB observation source. |
state | string | Output only. The observation source state |
updateTime | string | Output only. [Output only] Update time stamp |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, observationSourcesId, projectsId | GetObservationSource retrieves a single ObservationSource by name. |
list | SELECT | locationsId, projectsId | ListObservationSources gets all ObservationSources for a given project and location. |
create | INSERT | locationsId, projectsId | 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 | locationsId, observationSourcesId, projectsId | DeleteObservationSource deletes an observation source. This method will fail if the observation source is currently being used by any ObservationJob, even if not enabled. |
SELECT
examples
ListObservationSources gets all ObservationSources for a given project and location.
SELECT
name,
createTime,
gclbObservationSource,
state,
updateTime
FROM google.apim.observation_sources
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new observation_sources
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.apim.observation_sources (
locationsId,
projectsId,
gclbObservationSource,
name
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ gclbObservationSource }}',
'{{ name }}'
;
- name: your_resource_model_name
props:
- name: gclbObservationSource
value:
- name: pscNetworkConfigs
value:
- - name: network
value: string
- name: subnetwork
value: string
- name: name
value: string
- name: state
value: string
- name: createTime
value: string
- name: updateTime
value: string
DELETE
example
Deletes the specified observation_sources
resource.
/*+ delete */
DELETE FROM google.apim.observation_sources
WHERE locationsId = '{{ locationsId }}'
AND observationSourcesId = '{{ observationSourcesId }}'
AND projectsId = '{{ projectsId }}';