Reference documentation and code samples for the Stackdriver Logging V2 Client class LogExclusion.
Specifies a set of log entries that are filtered out by a sink. If your Google Cloud resource receives a large volume of log entries, you can use exclusions to reduce your chargeable logs. Note that exclusions on organization-level and folder-level sinks don't apply to child resources.
Note also that you cannot modify the _Required sink or exclude logs from it.
Generated from protobuf message google.logging.v2.LogExclusion
Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
Required. 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.
↳ filter
string
Required. An advanced logs filter
that matches the log entries to be excluded. By using the sample function
, 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)
↳ disabled
bool
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.
↳ create_time
Google\Protobuf\Timestamp
Output only. The creation timestamp of the exclusion. This field may not be present for older exclusions.
↳ update_time
Google\Protobuf\Timestamp
Output only. The last update timestamp of the exclusion. This field may not be present for older exclusions.
getName
Required. 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.
Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
string
setName
Required. 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.
Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
var
string
$this
getDescription
Optional. A description of this exclusion.
Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL];
string
setDescription
Optional. A description of this exclusion.
Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL];
var
string
$this
getFilter
Required. An advanced logs filter that matches the log entries to be excluded. By using the sample function , 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)
Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = REQUIRED];
string
setFilter
Required. An advanced logs filter that matches the log entries to be excluded. By using the sample function , 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)
Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = REQUIRED];
var
string
$this
getDisabled
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.
Generated from protobuf field bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL];
bool
setDisabled
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.
Generated from protobuf field bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL];
var
bool
$this
getCreateTime
Output only. The creation timestamp of the exclusion.
This field may not be present for older exclusions.
Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Google\Protobuf\Timestamp|null
hasCreateTime
clearCreateTime
setCreateTime
Output only. The creation timestamp of the exclusion.
This field may not be present for older exclusions.
Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
var
Google\Protobuf\Timestamp
$this
getUpdateTime
Output only. The last update timestamp of the exclusion.
This field may not be present for older exclusions.
Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
Google\Protobuf\Timestamp|null
hasUpdateTime
clearUpdateTime
setUpdateTime
Output only. The last update timestamp of the exclusion.
This field may not be present for older exclusions.
Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
var
Google\Protobuf\Timestamp
$this

