views
Creates, updates, deletes, gets or lists a views
resource.
Overview
Name | views |
Type | Resource |
Id | google.logging.views |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. The resource name of the view.For example:projects/my-project/locations/global/buckets/my-bucket/views/my-view |
description | string | Optional. Describes this view. |
createTime | string | Output only. The creation timestamp of the view. |
filter | string | Optional. Filter that restricts which log entries in a bucket are visible in this view.Filters must be logical conjunctions that use the AND operator, and they can use any of the following qualifiers: SOURCE(), which specifies a project, folder, organization, or billing account of origin. resource.type, which specifies the resource type. LOG_ID(), which identifies the log.They can also use the negations of these qualifiers with the NOT operator.For example:SOURCE("projects/myproject") AND resource.type = "gce_instance" AND NOT LOG_ID("stdout") |
updateTime | string | Output only. The last update timestamp of the view. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
billing_accounts_locations_buckets_views_get | SELECT | billingAccountsId, bucketsId, locationsId, viewsId | Gets a view on a log bucket. |
billing_accounts_locations_buckets_views_list | SELECT | billingAccountsId, bucketsId, locationsId | Lists views on a log bucket. |
folders_locations_buckets_views_get | SELECT | bucketsId, foldersId, locationsId, viewsId | Gets a view on a log bucket. |
folders_locations_buckets_views_list | SELECT | bucketsId, foldersId, locationsId | Lists views on a log bucket. |
locations_buckets_views_list | SELECT | parent, parentType | Lists views on a log bucket. |
organizations_locations_buckets_views_get | SELECT | bucketsId, locationsId, organizationsId, viewsId | Gets a view on a log bucket. |
organizations_locations_buckets_views_list | SELECT | bucketsId, locationsId, organizationsId | Lists views on a log bucket. |
projects_locations_buckets_views_get | SELECT | bucketsId, locationsId, projectsId, viewsId | Gets a view on a log bucket. |
projects_locations_buckets_views_list | SELECT | bucketsId, locationsId, projectsId | Lists views on a log bucket. |
billing_accounts_locations_buckets_views_create | INSERT | billingAccountsId, bucketsId, locationsId | Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views. |
folders_locations_buckets_views_create | INSERT | bucketsId, foldersId, locationsId | Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views. |
locations_buckets_views_create | INSERT | parent, parentType | Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views. |
organizations_locations_buckets_views_create | INSERT | bucketsId, locationsId, organizationsId | Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views. |
projects_locations_buckets_views_create | INSERT | bucketsId, locationsId, projectsId | Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views. |
billing_accounts_locations_buckets_views_delete | DELETE | billingAccountsId, bucketsId, locationsId, viewsId | Deletes a view on a log bucket. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, please try again in a few minutes. |
folders_locations_buckets_views_delete | DELETE | bucketsId, foldersId, locationsId, viewsId | Deletes a view on a log bucket. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, please try again in a few minutes. |
organizations_locations_buckets_views_delete | DELETE | bucketsId, locationsId, organizationsId, viewsId | Deletes a view on a log bucket. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, please try again in a few minutes. |
projects_locations_buckets_views_delete | DELETE | bucketsId, locationsId, projectsId, viewsId | Deletes a view on a log bucket. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, please try again in a few minutes. |
billing_accounts_locations_buckets_views_patch | UPDATE | billingAccountsId, bucketsId, locationsId, viewsId | Updates a view on a log bucket. This method replaces the value of the filter field from the existing view with the corresponding value from the new view. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can update the view. If this occurs, please try again in a few minutes. |
folders_locations_buckets_views_patch | UPDATE | bucketsId, foldersId, locationsId, viewsId | Updates a view on a log bucket. This method replaces the value of the filter field from the existing view with the corresponding value from the new view. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can update the view. If this occurs, please try again in a few minutes. |
organizations_locations_buckets_views_patch | UPDATE | bucketsId, locationsId, organizationsId, viewsId | Updates a view on a log bucket. This method replaces the value of the filter field from the existing view with the corresponding value from the new view. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can update the view. If this occurs, please try again in a few minutes. |
projects_locations_buckets_views_patch | UPDATE | bucketsId, locationsId, projectsId, viewsId | Updates a view on a log bucket. This method replaces the value of the filter field from the existing view with the corresponding value from the new view. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can update the view. If this occurs, please try again in a few minutes. |
SELECT
examples
Lists views on a log bucket.
SELECT
name,
description,
createTime,
filter,
updateTime
FROM google.logging.views
WHERE parent = '{{ parent }}'
AND parentType = '{{ parentType }}';
INSERT
example
Use the following StackQL query and manifest file to create a new views
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.logging.views (
parent,
parentType,
description,
filter
)
SELECT
'{{ parent }}',
'{{ parentType }}',
'{{ description }}',
'{{ filter }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: description
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: filter
value: string
UPDATE
example
Updates a views
resource.
/*+ update */
UPDATE google.logging.views
SET
description = '{{ description }}',
filter = '{{ filter }}'
WHERE
bucketsId = '{{ bucketsId }}'
AND foldersId = '{{ foldersId }}'
AND locationsId = '{{ locationsId }}'
AND viewsId = '{{ viewsId }}';
DELETE
example
Deletes the specified views
resource.
/*+ delete */
DELETE FROM google.logging.views
WHERE bucketsId = '{{ bucketsId }}'
AND foldersId = '{{ foldersId }}'
AND locationsId = '{{ locationsId }}'
AND viewsId = '{{ viewsId }}';