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 | |
---|---|
Optional |
Immutable. The BillingAccount that this resource belongs to. Only one of [projectRef, folderRef, organizationRef, billingAccountRef] may be specified. |
Optional |
Allowed value: The Google Cloud resource name of a Google Cloud Billing Account (format: `billingAccounts/{{name}}`). |
Optional |
[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 |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Optional |
Optional. A description of this exclusion. |
Optional |
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. |
Required |
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 |
Optional |
Immutable. The Folder that this resource belongs to. Only one of [projectRef, folderRef, organizationRef, billingAccountRef] may be specified. |
Optional |
Allowed value: The Google Cloud resource name of a `Folder` resource (format: `folders/{{name}}`). |
Optional |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Optional |
Immutable. The Organization that this resource belongs to. Only one of [projectRef, folderRef, organizationRef, billingAccountRef] may be specified. |
Optional |
Allowed value: The Google Cloud resource name of a Google Cloud Organization (format: `organizations/{{name}}`). |
Optional |
[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 |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Optional |
Immutable. The Project that this resource belongs to. Only one of [projectRef, folderRef, organizationRef, billingAccountRef] may be specified. |
Optional |
Allowed value: The Google Cloud resource name of a `Project` resource (format: `projects/{{name}}`). |
Optional |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Optional |
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 |
Conditions represent the latest available observation of the resource's current state. |
conditions[] |
|
conditions[].lastTransitionTime |
Last time the condition transitioned from one status to another. |
conditions[].message |
Human-readable message indicating details about last transition. |
conditions[].reason |
Unique, one-word, CamelCase reason for the condition's last transition. |
conditions[].status |
Status is the status of the condition. Can be True, False, Unknown. |
conditions[].type |
Type is the type of the condition. |
createTime |
Output only. The creation timestamp of the exclusion. This field may not be present for older exclusions. |
observedGeneration |
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 |
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?}"