LoggingLogExclusion


This resource is able to configure log exclusions for a project, folder, organization, or billing account. The parent resource is configured by setting one of projectRef, folderRef, organizationRef, or billingAccountRef.

Property Value
Google Cloud Service Name Cloud Logging
Google Cloud Service Documentation /logging/docs/
Google Cloud REST Resource Name
v2.billingAccounts.exclusions
v2.folders.exclusions
v2.organizations.exclusions
v2.projects.exclusions
Google Cloud REST Resource Documentation
/logging/docs/reference/v2/rest/v2/billingAccounts.exclusions
/logging/docs/reference/v2/rest/v2/folders.exclusions
/logging/docs/reference/v2/rest/v2/organizations.exclusions
/logging/docs/reference/v2/rest/v2/projects.exclusions
Config Connector Resource Short Names gcplogginglogexclusion
gcplogginglogexclusions
logginglogexclusion
Config Connector Service Name logging.googleapis.com
Config Connector Resource Fully Qualified Name logginglogexclusions.logging.cnrm.cloud.google.com
Can Be Referenced by IAMPolicy/IAMPolicyMember No
Config Connector Default Average Reconcile Interval In Seconds 600

Custom Resource Definition Properties

Spec

Schema

billingAccountRef:
  external: string
  name: string
  namespace: string
description: string
disabled: boolean
filter: string
folderRef:
  external: string
  name: string
  namespace: string
organizationRef:
  external: string
  name: string
  namespace: string
projectRef:
  external: string
  name: string
  namespace: string
resourceID: string
Fields

billingAccountRef

Optional

object

Immutable. The BillingAccount that this resource belongs to. Only one of [projectRef, folderRef, organizationRef, billingAccountRef] may be specified.

billingAccountRef.external

Optional

string

Allowed value: The Google Cloud resource name of a Google Cloud Billing Account (format: `billingAccounts/{{name}}`).

billingAccountRef.name

Optional

string

[WARNING] BillingAccount not yet supported in Config Connector, use 'external' field to reference existing resources. Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

billingAccountRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

description

Optional

string

Optional. A description of this exclusion.

disabled

Optional

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

Required

string

Required. An (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

folderRef

Optional

object

Immutable. The Folder that this resource belongs to. Only one of [projectRef, folderRef, organizationRef, billingAccountRef] may be specified.

folderRef.external

Optional

string

Allowed value: The Google Cloud resource name of a `Folder` resource (format: `folders/{{name}}`).

folderRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

folderRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

organizationRef

Optional

object

Immutable. The Organization that this resource belongs to. Only one of [projectRef, folderRef, organizationRef, billingAccountRef] may be specified.

organizationRef.external

Optional

string

Allowed value: The Google Cloud resource name of a Google Cloud Organization (format: `organizations/{{name}}`).

organizationRef.name

Optional

string

[WARNING] Organization not yet supported in Config Connector, use 'external' field to reference existing resources. Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

organizationRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

projectRef

Optional

object

Immutable. The Project that this resource belongs to. Only one of [projectRef, folderRef, organizationRef, billingAccountRef] may be specified.

projectRef.external

Optional

string

Allowed value: The Google Cloud resource name of a `Project` resource (format: `projects/{{name}}`).

projectRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

projectRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

resourceID

Optional

string

Immutable. Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default.

Status

Schema

conditions:
- lastTransitionTime: string
  message: string
  reason: string
  status: string
  type: string
createTime: string
observedGeneration: integer
updateTime: string
Fields
conditions

list (object)

Conditions represent the latest available observation of the resource's current state.

conditions[]

object

conditions[].lastTransitionTime

string

Last time the condition transitioned from one status to another.

conditions[].message

string

Human-readable message indicating details about last transition.

conditions[].reason

string

Unique, one-word, CamelCase reason for the condition's last transition.

conditions[].status

string

Status is the status of the condition. Can be True, False, Unknown.

conditions[].type

string

Type is the type of the condition.

createTime

string

Output only. The creation timestamp of the exclusion. This field may not be present for older exclusions.

observedGeneration

integer

ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource.

updateTime

string

Output only. The last update timestamp of the exclusion. This field may not be present for older exclusions.

Sample YAML(s)

Billing Exclusion

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: logging.cnrm.cloud.google.com/v1beta1
kind: LoggingLogExclusion
metadata:
  name: logginglogexclusion-sample-billing
spec:
  billingAccountRef:
    # Replace "${BILLING_ACCOUNT_ID_FOR_BILLING_RESOURCES?}" with the numeric ID for your billing account
    external: "billingAccounts/${BILLING_ACCOUNT_ID_FOR_BILLING_RESOURCES?}"
  description: "A billing log exclusion"
  filter: "resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)"

Folder Exclusion

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: logging.cnrm.cloud.google.com/v1beta1
kind: LoggingLogExclusion
metadata:
  name: logginglogexclusion-sample-folder
spec:
  folderRef:
    name: logginglogexclusion-dep-folder
  description: "A folder log exclusion"
  filter: "resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)"
---
apiVersion: resourcemanager.cnrm.cloud.google.com/v1beta1
kind: Folder
metadata:
  name: logginglogexclusion-dep-folder
spec:
  organizationRef:
    # Replace "${ORG_ID?}" with the numeric ID for your organization
    external: "${ORG_ID?}"
  displayName: Folder Log Exclusion Sample

Organization Exclusion

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: logging.cnrm.cloud.google.com/v1beta1
kind: LoggingLogExclusion
metadata:
  name: logginglogexclusion-sample-org
spec:
  organizationRef:
    # Replace "${ORG_ID?}" with the numeric ID for your organization
    external: "organizations/${ORG_ID?}"
  description: "An organization log exclusion"
  filter: "resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)"

Project Exclusion

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: logging.cnrm.cloud.google.com/v1beta1
kind: LoggingLogExclusion
metadata:
  name: logginglogexclusion-sample-proj
spec:
  projectRef:
    name: logginglogexclusion-dep-proj
  description: "A project log exclusion"
  filter: "resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)"
---
apiVersion: resourcemanager.cnrm.cloud.google.com/v1beta1
kind: Project
metadata:
  name: logginglogexclusion-dep-proj
spec:
  name: Config Connector Sample
  organizationRef:
    # Replace "${ORG_ID?}" with the numeric ID for your organization
    external: "${ORG_ID?}"
  billingAccountRef:
    # Replace "${BILLING_ACCOUNT_ID?}" with the numeric ID for your billing account
    external: "${BILLING_ACCOUNT_ID?}"