Skip to main content

exclusions

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

Overview

Nameexclusions
TypeResource
Idgoogle.logging.exclusions

Fields

NameDatatypeDescription
namestringOutput 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.
descriptionstringOptional. A description of this exclusion.
createTimestringOutput only. The creation timestamp of the exclusion.This field may not be present for older exclusions.
disabledbooleanOptional. 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.
filterstringRequired. 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)
updateTimestringOutput only. The last update timestamp of the exclusion.This field may not be present for older exclusions.

Methods

NameAccessible byRequired ParamsDescription
billing_accounts_exclusions_getSELECTbillingAccountsId, exclusionsIdGets the description of an exclusion in the _Default sink.
billing_accounts_exclusions_listSELECTbillingAccountsIdLists all the exclusions on the _Default sink in a parent resource.
exclusions_getSELECTnameGets the description of an exclusion in the _Default sink.
exclusions_listSELECTparent, parentTypeLists all the exclusions on the _Default sink in a parent resource.
folders_exclusions_getSELECTexclusionsId, foldersIdGets the description of an exclusion in the _Default sink.
folders_exclusions_listSELECTfoldersIdLists all the exclusions on the _Default sink in a parent resource.
organizations_exclusions_getSELECTexclusionsId, organizationsIdGets the description of an exclusion in the _Default sink.
organizations_exclusions_listSELECTorganizationsIdLists all the exclusions on the _Default sink in a parent resource.
projects_exclusions_getSELECTexclusionsId, projectsIdGets the description of an exclusion in the _Default sink.
projects_exclusions_listSELECTprojectsIdLists all the exclusions on the _Default sink in a parent resource.
billing_accounts_exclusions_createINSERTbillingAccountsIdCreates 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_createINSERTparent, parentTypeCreates 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_createINSERTfoldersIdCreates 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_createINSERTorganizationsIdCreates 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_createINSERTprojectsIdCreates 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_deleteDELETEbillingAccountsId, exclusionsIdDeletes an exclusion in the _Default sink.
exclusions_deleteDELETEnameDeletes an exclusion in the _Default sink.
folders_exclusions_deleteDELETEexclusionsId, foldersIdDeletes an exclusion in the _Default sink.
organizations_exclusions_deleteDELETEexclusionsId, organizationsIdDeletes an exclusion in the _Default sink.
projects_exclusions_deleteDELETEexclusionsId, projectsIdDeletes an exclusion in the _Default sink.
billing_accounts_exclusions_patchUPDATEbillingAccountsId, exclusionsIdChanges one or more properties of an existing exclusion in the _Default sink.
exclusions_patchUPDATEnameChanges one or more properties of an existing exclusion in the _Default sink.
folders_exclusions_patchUPDATEexclusionsId, foldersIdChanges one or more properties of an existing exclusion in the _Default sink.
organizations_exclusions_patchUPDATEexclusionsId, organizationsIdChanges one or more properties of an existing exclusion in the _Default sink.
projects_exclusions_patchUPDATEexclusionsId, projectsIdChanges 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.

/*+ create */
INSERT INTO google.logging.exclusions (
foldersId,
description,
filter,
disabled
)
SELECT
'{{ foldersId }}',
'{{ description }}',
'{{ filter }}',
{{ disabled }}
;

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 }}';