exclusions
Creates, updates, deletes, gets or lists a exclusions
resource.
Overview
Name | exclusions |
Type | Resource |
Id | google.logging.exclusions |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. A client-assigned identifier, such as "load-balancer-exclusion". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric. |
description | string | Optional. A description of this exclusion. |
createTime | string | Output only. The creation timestamp of the exclusion.This field may not be present for older exclusions. |
disabled | boolean | Optional. If set to True, then this exclusion is disabled and it does not exclude any log entries. You can update an exclusion to change the value of this field. |
filter | string | Required. An advanced logs filter (https://cloud.google.com/logging/docs/view/advanced-queries) that matches the log entries to be excluded. By using the sample function (https://cloud.google.com/logging/docs/view/advanced-queries#sample), you can exclude less than 100% of the matching log entries.For example, the following query matches 99% of low-severity log entries from Google Cloud Storage buckets:resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99) |
updateTime | string | Output only. The last update timestamp of the exclusion.This field may not be present for older exclusions. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
billing_accounts_exclusions_get | SELECT | billingAccountsId, exclusionsId | Gets the description of an exclusion in the _Default sink. |
billing_accounts_exclusions_list | SELECT | billingAccountsId | Lists all the exclusions on the _Default sink in a parent resource. |
exclusions_get | SELECT | name | Gets the description of an exclusion in the _Default sink. |
exclusions_list | SELECT | parent, parentType | Lists all the exclusions on the _Default sink in a parent resource. |
folders_exclusions_get | SELECT | exclusionsId, foldersId | Gets the description of an exclusion in the _Default sink. |
folders_exclusions_list | SELECT | foldersId | Lists all the exclusions on the _Default sink in a parent resource. |
organizations_exclusions_get | SELECT | exclusionsId, organizationsId | Gets the description of an exclusion in the _Default sink. |
organizations_exclusions_list | SELECT | organizationsId | Lists all the exclusions on the _Default sink in a parent resource. |
projects_exclusions_get | SELECT | exclusionsId, projectsId | Gets the description of an exclusion in the _Default sink. |
projects_exclusions_list | SELECT | projectsId | Lists all the exclusions on the _Default sink in a parent resource. |
billing_accounts_exclusions_create | INSERT | billingAccountsId | Creates a new exclusion in the _Default sink in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource. |
exclusions_create | INSERT | parent, parentType | Creates a new exclusion in the _Default sink in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource. |
folders_exclusions_create | INSERT | foldersId | Creates a new exclusion in the _Default sink in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource. |
organizations_exclusions_create | INSERT | organizationsId | Creates a new exclusion in the _Default sink in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource. |
projects_exclusions_create | INSERT | projectsId | Creates a new exclusion in the _Default sink in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource. |
billing_accounts_exclusions_delete | DELETE | billingAccountsId, exclusionsId | Deletes an exclusion in the _Default sink. |
exclusions_delete | DELETE | name | Deletes an exclusion in the _Default sink. |
folders_exclusions_delete | DELETE | exclusionsId, foldersId | Deletes an exclusion in the _Default sink. |
organizations_exclusions_delete | DELETE | exclusionsId, organizationsId | Deletes an exclusion in the _Default sink. |
projects_exclusions_delete | DELETE | exclusionsId, projectsId | Deletes an exclusion in the _Default sink. |
billing_accounts_exclusions_patch | UPDATE | billingAccountsId, exclusionsId | Changes one or more properties of an existing exclusion in the _Default sink. |
exclusions_patch | UPDATE | name | Changes one or more properties of an existing exclusion in the _Default sink. |
folders_exclusions_patch | UPDATE | exclusionsId, foldersId | Changes one or more properties of an existing exclusion in the _Default sink. |
organizations_exclusions_patch | UPDATE | exclusionsId, organizationsId | Changes one or more properties of an existing exclusion in the _Default sink. |
projects_exclusions_patch | UPDATE | exclusionsId, projectsId | Changes one or more properties of an existing exclusion in the _Default sink. |
SELECT
examples
Gets the description of an exclusion in the _Default sink.
SELECT
name,
description,
createTime,
disabled,
filter,
updateTime
FROM google.logging.exclusions
WHERE name = '{{ name }}';
INSERT
example
Use the following StackQL query and manifest file to create a new exclusions
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.logging.exclusions (
foldersId,
description,
filter,
disabled
)
SELECT
'{{ foldersId }}',
'{{ description }}',
'{{ filter }}',
{{ disabled }}
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: description
value: string
- name: filter
value: string
- name: disabled
value: boolean
- name: createTime
value: string
- name: updateTime
value: string
UPDATE
example
Updates a exclusions
resource.
/*+ update */
UPDATE google.logging.exclusions
SET
description = '{{ description }}',
filter = '{{ filter }}',
disabled = true|false
WHERE
name = '{{ name }}';
DELETE
example
Deletes the specified exclusions
resource.
/*+ delete */
DELETE FROM google.logging.exclusions
WHERE name = '{{ name }}';