google.cloud.grpc.logging.v2.logging_config_pb2

Classes

CreateSinkRequest The parameters to CreateSink.
DeleteSinkRequest The parameters to DeleteSink.
GetSinkRequest The parameters to GetSink.
ListSinksRequest The parameters to ListSinks.
ListSinksResponse Result returned from ListSinks.
LogSink Describes a sink used to export log entries outside of Stackdriver Logging.
UpdateSinkRequest The parameters to UpdateSink.
class google.cloud.grpc.logging.v2.logging_config_pb2.CreateSinkRequest[source]

The parameters to CreateSink.

parent

string

Required. The resource in which to create the sink:

"projects/[PROJECT_ID]"
"organizations/[ORGANIZATION_ID]"
sink

google.cloud.grpc.logging.v2.logging_config_pb2.LogSink

Required. The new sink, whose name parameter is a sink identifier that is not already in use.

unique_writer_identity

bool

Optional. Whether the sink will have a dedicated service account returned in the sink’s writer_identity. Set this field to be true to export logs from one project to a different project. This field is ignored for non-project sinks (e.g. organization sinks) because those sinks are required to have dedicated service accounts.

class google.cloud.grpc.logging.v2.logging_config_pb2.DeleteSinkRequest[source]

The parameters to DeleteSink.

sink_name

string

Required. The resource name of the sink to delete, including the parent resource and the sink identifier:

"projects/[PROJECT_ID]/sinks/[SINK_ID]"
"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"

It is an error if the sink does not exist.

class google.cloud.grpc.logging.v2.logging_config_pb2.GetSinkRequest[source]

The parameters to GetSink.

sink_name

string

Required. The resource name of the sink to return:

"projects/[PROJECT_ID]/sinks/[SINK_ID]"
"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
class google.cloud.grpc.logging.v2.logging_config_pb2.ListSinksRequest[source]

The parameters to ListSinks.

parent

string

Required. The resource name where this sink was created:

"projects/[PROJECT_ID]"
"organizations/[ORGANIZATION_ID]"
page_token

string

Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.

page_size

int

Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.

class google.cloud.grpc.logging.v2.logging_config_pb2.ListSinksResponse[source]

Result returned from ListSinks.

sinks

list[google.cloud.grpc.logging.v2.logging_config_pb2.LogSink]

A list of sinks.

next_page_token

string

If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call the same method again using the value of nextPageToken as pageToken.

class google.cloud.grpc.logging.v2.logging_config_pb2.LogSink[source]

Describes a sink used to export log entries outside of Stackdriver Logging. A logs filter controls which log entries are exported. Sinks can have a start time and an end time; these can be used to place log entries from an exact time range into a particular destination. If both start_time and end_time are present, then start_time must be less than end_time.

name

string

Required. The client-assigned sink identifier, unique within the project. Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, and periods.

destination

string

Required. The export destination:

"storage.googleapis.com/[GCS_BUCKET]"
"bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]"
"pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]"

For more information, see Exporting Logs With Sinks.

filter

string

Optional. An advanced logs filter. Only log entries matching the filter are exported. The filter must be consistent with the log entry format specified by the outputVersionFormat parameter, regardless of the format of the log entry that was originally ingested by Stackdriver Logging. The following example uses field names in the v2 log entry format:

logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
output_version_format

enum google.cloud.gapic.logging.v2.enums.LogSink.VersionFormat

Optional. The log entry version to use for this sink’s exported log entries. This version does not have to correspond to the version of the log entry that was written to Stackdriver Logging. If omitted, the v2 format is used.

writer_identity

string

Output only. An IAM identity—a service account or group—that will write exported log entries to the destination on behalf of Stackdriver Logging. You must grant this identity write-access to the destination. Consult the destination service’s documentation to determine the exact role that must be granted.

start_time

google.protobuf.timestamp_pb2.Timestamp

Optional. The time at which this sink will begin exporting log entries. If this value is present, then log entries are exported only if start_time <=``entry.timestamp``.

end_time

google.protobuf.timestamp_pb2.Timestamp

Optional. Time at which this sink will stop exporting log entries. If this value is present, then log entries are exported only if entry.timestamp < end_time.

class google.cloud.grpc.logging.v2.logging_config_pb2.UpdateSinkRequest[source]

The parameters to UpdateSink.

sink_name

string

Required. The resource name of the sink to update, including the parent resource and the sink identifier:

"projects/[PROJECT_ID]/sinks/[SINK_ID]"
"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"

Example: "projects/my-project-id/sinks/my-sink-id".

sink

google.cloud.grpc.logging.v2.logging_config_pb2.LogSink

Required. The updated sink, whose name is the same identifier that appears as part of sinkName. If sinkName does not exist, then this method creates a new sink.

unique_writer_identity

bool

Optional. Whether the sink will have a dedicated service account returned in the sink’s writer_identity. Set this field to be true to export logs from one project to a different project. This field is ignored for non-project sinks (e.g. organization sinks) because those sinks are required to have dedicated service accounts.