Class LogExclusion (3.20.4)

public final class LogExclusion extends GeneratedMessageV3 implements LogExclusionOrBuilder

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.

Protobuf type google.logging.v2.LogExclusion

Static Fields

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

DISABLED_FIELD_NUMBER

public static final int DISABLED_FIELD_NUMBER
Field Value
Type Description
int

FILTER_FIELD_NUMBER

public static final int FILTER_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static LogExclusion getDefaultInstance()
Returns
Type Description
LogExclusion

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static LogExclusion.Builder newBuilder()
Returns
Type Description
LogExclusion.Builder

newBuilder(LogExclusion prototype)

public static LogExclusion.Builder newBuilder(LogExclusion prototype)
Parameter
Name Description
prototype LogExclusion
Returns
Type Description
LogExclusion.Builder

parseDelimitedFrom(InputStream input)

public static LogExclusion parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
LogExclusion
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static LogExclusion parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
LogExclusion
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static LogExclusion parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
LogExclusion
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static LogExclusion parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
LogExclusion
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static LogExclusion parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
LogExclusion
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static LogExclusion parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
LogExclusion
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static LogExclusion parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
LogExclusion
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static LogExclusion parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
LogExclusion
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static LogExclusion parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
LogExclusion
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static LogExclusion parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
LogExclusion
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static LogExclusion parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
LogExclusion
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static LogExclusion parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
LogExclusion
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<LogExclusion> parser()
Returns
Type Description
Parser<LogExclusion>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCreateTime()

public Timestamp getCreateTime()

Output only. The creation timestamp of the exclusion.

This field may not be present for older exclusions.

.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The creation timestamp of the exclusion.

This field may not be present for older exclusions.

.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public LogExclusion getDefaultInstanceForType()
Returns
Type Description
LogExclusion

getDescription()

public String getDescription()

Optional. A description of this exclusion.

string description = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. A description of this exclusion.

string description = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getDisabled()

public boolean 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.

bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The disabled.

getFilter()

public String 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)

string filter = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The filter.

getFilterBytes()

public ByteString getFilterBytes()

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)

string filter = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for filter.

getName()

public String 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.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

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.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<LogExclusion> getParserForType()
Returns
Type Description
Parser<LogExclusion>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The last update timestamp of the exclusion.

This field may not be present for older exclusions.

.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The last update timestamp of the exclusion.

This field may not be present for older exclusions.

.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. The creation timestamp of the exclusion.

This field may not be present for older exclusions.

.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. The last update timestamp of the exclusion.

This field may not be present for older exclusions.

.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public LogExclusion.Builder newBuilderForType()
Returns
Type Description
LogExclusion.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected LogExclusion.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
LogExclusion.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public LogExclusion.Builder toBuilder()
Returns
Type Description
LogExclusion.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException