Skip to main content

observation_jobs

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

Overview

Nameobservation_jobs
TypeResource
Idgoogle.apim.observation_jobs

Fields

NameDatatypeDescription
namestringIdentifier. name of resource Format: projects/{project}/locations/{location}/observationJobs/{observation_job}
createTimestringOutput only. [Output only] Create time stamp
sourcesarrayOptional. These should be of the same kind of source.
statestringOutput only. The observation job state
updateTimestringOutput only. [Output only] Update time stamp

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, observationJobsId, projectsIdGetObservationJob retrieves a single ObservationJob by name.
listSELECTlocationsId, projectsIdListObservationJobs gets all ObservationJobs for a given project and location.
createINSERTlocationsId, projectsIdCreateObservationJob creates a new ObservationJob but does not have any effecton its own. It is a configuration that can be used in an Observation Job to collect data about existing APIs.
deleteDELETElocationsId, observationJobsId, projectsIdDeleteObservationJob deletes an ObservationJob. This method will fail if the observation job is currently being used by any ObservationSource, even if not enabled.
disableEXEClocationsId, observationJobsId, projectsIdDisables the given ObservationJob.
enableEXEClocationsId, observationJobsId, projectsIdEnables the given ObservationJob.

SELECT examples

ListObservationJobs gets all ObservationJobs for a given project and location.

SELECT
name,
createTime,
sources,
state,
updateTime
FROM google.apim.observation_jobs
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new observation_jobs resource.

/*+ create */
INSERT INTO google.apim.observation_jobs (
locationsId,
projectsId,
name,
sources
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ sources }}'
;

DELETE example

Deletes the specified observation_jobs resource.

/*+ delete */
DELETE FROM google.apim.observation_jobs
WHERE locationsId = '{{ locationsId }}'
AND observationJobsId = '{{ observationJobsId }}'
AND projectsId = '{{ projectsId }}';