observation_jobs
Creates, updates, deletes, gets or lists a observation_jobs
resource.
Overview
Name | observation_jobs |
Type | Resource |
Id | google.apim.observation_jobs |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Identifier. name of resource Format: projects/{project}/locations/{location}/observationJobs/{observation_job} |
createTime | string | Output only. [Output only] Create time stamp |
sources | array | Optional. These should be of the same kind of source. |
state | string | Output only. The observation job state |
updateTime | string | Output only. [Output only] Update time stamp |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, observationJobsId, projectsId | GetObservationJob retrieves a single ObservationJob by name. |
list | SELECT | locationsId, projectsId | ListObservationJobs gets all ObservationJobs for a given project and location. |
create | INSERT | locationsId, projectsId | CreateObservationJob 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. |
delete | DELETE | locationsId, observationJobsId, projectsId | DeleteObservationJob deletes an ObservationJob. This method will fail if the observation job is currently being used by any ObservationSource, even if not enabled. |
disable | EXEC | locationsId, observationJobsId, projectsId | Disables the given ObservationJob. |
enable | EXEC | locationsId, observationJobsId, projectsId | Enables 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.apim.observation_jobs (
locationsId,
projectsId,
name,
sources
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ sources }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: state
value: string
- name: sources
value:
- string
- name: createTime
value: string
- name: updateTime
value: string
DELETE
example
Deletes the specified observation_jobs
resource.
/*+ delete */
DELETE FROM google.apim.observation_jobs
WHERE locationsId = '{{ locationsId }}'
AND observationJobsId = '{{ observationJobsId }}'
AND projectsId = '{{ projectsId }}';