api_observations
Creates, updates, deletes, gets or lists an api_observations resource.
Overview
| Name | api_observations |
| Type | Resource |
| Id | google.apim.api_observations |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. Name of resource |
apiOperationCount | string (int64) | The number of observed API Operations. |
createTime | string (google-datetime) | Create time stamp |
hostname | string | The hostname of requests processed for this Observation. |
lastEventDetectedTime | string (google-datetime) | Last event detected time stamp |
serverIps | array | The IP address (IPv4 or IPv6) of the origin server that the request was sent to. This field can include port information. Examples: "192.168.1.1", "10.0.0.1:80", "FE80::0202:B3FF:FE1E:8329". |
sourceLocations | array | Location of the Observation Source, for example "us-central1" or "europe-west1." |
style | string | Style of ApiObservation |
tags | array | User-defined tags to organize and sort |
updateTime | string (google-datetime) | Update time stamp |
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. Name of resource |
apiOperationCount | string (int64) | The number of observed API Operations. |
createTime | string (google-datetime) | Create time stamp |
hostname | string | The hostname of requests processed for this Observation. |
lastEventDetectedTime | string (google-datetime) | Last event detected time stamp |
serverIps | array | The IP address (IPv4 or IPv6) of the origin server that the request was sent to. This field can include port information. Examples: "192.168.1.1", "10.0.0.1:80", "FE80::0202:B3FF:FE1E:8329". |
sourceLocations | array | Location of the Observation Source, for example "us-central1" or "europe-west1." |
style | string | Style of ApiObservation |
tags | array | User-defined tags to organize and sort |
updateTime | string (google-datetime) | Update time stamp |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, observationJobsId, apiObservationsId | GetApiObservation retrieves a single ApiObservation by name. | |
list | select | projectsId, locationsId, observationJobsId | pageSize, pageToken | ListApiObservations gets all ApiObservations for a given project and location and ObservationJob. |
batch_edit_tags | exec | projectsId, locationsId, observationJobsId | BatchEditTagsApiObservations adds or removes Tags for ApiObservations. |
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 |
|---|---|---|
apiObservationsId | string | |
locationsId | string | |
observationJobsId | string | |
projectsId | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT examples
- get
- list
GetApiObservation retrieves a single ApiObservation by name.
SELECT
name,
apiOperationCount,
createTime,
hostname,
lastEventDetectedTime,
serverIps,
sourceLocations,
style,
tags,
updateTime
FROM google.apim.api_observations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND observationJobsId = '{{ observationJobsId }}' -- required
AND apiObservationsId = '{{ apiObservationsId }}' -- required
;
ListApiObservations gets all ApiObservations for a given project and location and ObservationJob.
SELECT
name,
apiOperationCount,
createTime,
hostname,
lastEventDetectedTime,
serverIps,
sourceLocations,
style,
tags,
updateTime
FROM google.apim.api_observations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND observationJobsId = '{{ observationJobsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
;
Lifecycle Methods
- batch_edit_tags
BatchEditTagsApiObservations adds or removes Tags for ApiObservations.
EXEC google.apim.api_observations.batch_edit_tags
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@observationJobsId='{{ observationJobsId }}' --required
@@json=
'{
"requests": "{{ requests }}"
}'
;