Module types (1.15.3)

API documentation for logging_v2.types module.

Classes

Any

API documentation for logging_v2.types.Any class.

BigQueryOptions

Options that change functionality of a sink exporting data to BigQuery.

Output only. True if new timestamp column based partitioning is in use, false if legacy ingestion-time partitioning is in use. All new sinks will have this field set true and will use timestamp column based partitioning. If use_partitioned_tables is false, this value has no meaning and will be false. Legacy sinks using partitioned tables will have this field set to false.

CmekSettings

Describes the customer-managed encryption key (CMEK) settings associated with a project, folder, organization, billing account, or flexible resource.

Note: CMEK for the Logs Router can currently only be configured for GCP organizations. Once configured, it applies to all projects and folders in the GCP organization.

See Enabling CMEK for Logs Router </logging/docs/routing/managed-encryption>__ for more information.

The resource name for the configured Cloud KMS key. KMS key name format: "projects/[PROJECT_ID]/locations/[LOCATION]/keyR ings/[KEYRING]/cryptoKeys/[KEY]" For example: "projects/my- project-id/locations/my-region/keyRings/key-ring- name/cryptoKeys/key-name" To enable CMEK for the Logs Router, set this field to a valid kms_key_name for which the associated service account has the required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key. The Cloud KMS key used by the Log Router can be updated by changing the kms_key_name to a new valid key name. Encryption operations that are in progress will be completed with the key that was in use when they started. Decryption operations will be completed using the key that was used at the time of encryption unless access to that key has been revoked. To disable CMEK for the Logs Router, set this field to an empty string. See Enabling CMEK for Logs Router </logging/docs/routing/managed-encryption>__ for more information.

CreateExclusionRequest

The parameters to CreateExclusion.

Required. The new exclusion, whose name parameter is an exclusion name that is not already used in the parent resource.

CreateLogMetricRequest

The parameters to CreateLogMetric.

Required. The new logs-based metric, which must not have an identifier that already exists.

CreateSinkRequest

The parameters to CreateSink.

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

CustomHttpPattern

API documentation for logging_v2.types.CustomHttpPattern class.

DeleteExclusionRequest

The parameters to DeleteExclusion.

DeleteLogMetricRequest

The parameters to DeleteLogMetric.

DeleteLogRequest

The parameters to DeleteLog.

DeleteSinkRequest

The parameters to DeleteSink.

DescriptorProto

API documentation for logging_v2.types.DescriptorProto class.

Distribution

API documentation for logging_v2.types.Distribution class.

Duration

API documentation for logging_v2.types.Duration class.

Empty

API documentation for logging_v2.types.Empty class.

EnumDescriptorProto

API documentation for logging_v2.types.EnumDescriptorProto class.

EnumOptions

API documentation for logging_v2.types.EnumOptions class.

EnumValueDescriptorProto

API documentation for logging_v2.types.EnumValueDescriptorProto class.

EnumValueOptions

API documentation for logging_v2.types.EnumValueOptions class.

ExtensionRangeOptions

API documentation for logging_v2.types.ExtensionRangeOptions class.

FieldDescriptorProto

API documentation for logging_v2.types.FieldDescriptorProto class.

FieldMask

API documentation for logging_v2.types.FieldMask class.

FieldOptions

API documentation for logging_v2.types.FieldOptions class.

FileDescriptorProto

API documentation for logging_v2.types.FileDescriptorProto class.

FileDescriptorSet

API documentation for logging_v2.types.FileDescriptorSet class.

FileOptions

API documentation for logging_v2.types.FileOptions class.

GeneratedCodeInfo

API documentation for logging_v2.types.GeneratedCodeInfo class.

GetCmekSettingsRequest

The parameters to GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings].

See Enabling CMEK for Logs Router </logging/docs/routing/managed-encryption>__ for more information.

GetExclusionRequest

The parameters to GetExclusion.

GetLogMetricRequest

The parameters to GetLogMetric.

GetSinkRequest

The parameters to GetSink.

Http

API documentation for logging_v2.types.Http class.

HttpRequest

API documentation for logging_v2.types.HttpRequest class.

HttpRule

API documentation for logging_v2.types.HttpRule class.

LabelDescriptor

API documentation for logging_v2.types.LabelDescriptor class.

ListExclusionsRequest

The parameters to ListExclusions.

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.

ListExclusionsResponse

Result returned from ListExclusions.

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.

ListLogEntriesRequest

The parameters to ListLogEntries.

Required. Names of one or more parent resources from which to retrieve log entries: :: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" Projects listed in the project_ids field are added to this list.

Optional. How the results should be sorted. Presently, the only permitted values are "timestamp asc" (default) and "timestamp desc". The first option returns entries in order of increasing values of LogEntry.timestamp (oldest first), and the second option returns entries in order of decreasing timestamps (newest first). Entries with equal timestamps are returned in order of their insert_id values.

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

ListLogEntriesResponse

Result returned from ListLogEntries.

If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken. If a value for next_page_token appears and the entries field is empty, it means that the search found no log entries so far but it did not have time to search all the possible log entries. Retry the method with this value for page_token to continue the search. Alternatively, consider speeding up the search by changing your filter to specify a single log name or resource type, or to narrow the time range of the search.

ListLogMetricsRequest

The parameters to ListLogMetrics.

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.

ListLogMetricsResponse

Result returned from ListLogMetrics.

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

ListLogsRequest

The parameters to ListLogs.

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.

ListLogsResponse

Result returned from ListLogs.

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

ListMonitoredResourceDescriptorsRequest

The parameters to ListMonitoredResourceDescriptors

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.

ListMonitoredResourceDescriptorsResponse

Result returned from ListMonitoredResourceDescriptors.

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

ListSinksRequest

The parameters to ListSinks.

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.

ListSinksResponse

Result returned from ListSinks.

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.

ListValue

API documentation for logging_v2.types.ListValue class.

LogEntry

An individual entry in a log.

Required. The monitored resource that produced this log entry. Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error.

The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads. The following protocol buffer types are supported; user-defined types are not supported: "type.googleapis.com/google.cloud.audit.AuditLog" "type.googleapis.com/google.appengine.logging.v1.RequestLog"

The log entry payload, represented as a structure that is expressed as a JSON object.

Output only. The time the log entry was received by Logging.

Optional. A unique identifier for the log entry. If you provide a value, then Logging considers other log entries in the same project, with the same timestamp, and with the same insert_id to be duplicates which are removed in a single query result. However, there are no guarantees of de- duplication in the export of logs. If the insert_id is omitted when writing a log entry, the Logging API assigns its own unique identifier in this field. In queries, the insert_id is also used to order log entries that have the same log_name and timestamp values.

Optional. A set of user-defined (key, value) data that provides additional information about the log entry.

Optional. Information about an operation associated with the log entry, if applicable.

Optional. The span ID within the trace associated with the log entry. For Trace spans, this is the same format that the Trace API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such as "000000000000004a".

Optional. Source code location information associated with the log entry, if any.

LogEntryOperation

Additional information about a potentially long-running operation with which a log entry is associated.

Optional. An arbitrary producer identifier. The combination of id and producer must be globally unique. Examples for producer: "MyDivision.MyBigCompany.com", "github.com/MyProject/MyApplication".

Optional. Set this to True if this is the last log entry in the operation.

LogEntrySourceLocation

Additional information about the source code location that produced the log entry.

Optional. Line within the source file. 1-based; 0 indicates no line number available.

LogExclusion

Specifies a set of log entries that are not to be stored in Logging. If your GCP resource receives a large volume of logs, you can use exclusions to reduce your chargeable logs. Exclusions are processed after log sinks, so you can export log entries before they are excluded. Note that organization-level and folder-level exclusions don't apply to child resources, and that you can't exclude audit log entries.

Optional. A description of this exclusion.

Optional. If set to True, then this exclusion is disabled and it does not exclude any log entries. You can [update an exclusion][google.logging.v2.ConfigServiceV2.UpdateExclusion] to change the value of this field.

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

LogMetric

Describes a logs-based metric. The value of the metric is the number of log entries that match a logs filter in a given time interval.

Logs-based metric can also be used to extract values from logs and create a a distribution of the values. The distribution records the statistics of the extracted values along with an optional histogram of the values as specified by the bucket options.

Optional. A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters.

Optional. The metric descriptor associated with the logs-based metric. If unspecified, it uses a default metric descriptor with a DELTA metric kind, INT64 value type, with no labels and a unit of "1". Such a metric counts the number of log entries matching the filter expression. The name, type, and description fields in the metric_descriptor are output only, and is constructed using the name and description field in the LogMetric. To create a logs- based metric that records a distribution of log values, a DELTA metric kind with a DISTRIBUTION value type must be used along with a value_extractor expression in the LogMetric. Each label in the metric descriptor must have a matching label name as the key and an extractor expression as the value in the label_extractors map. The metric_kind and value_type fields in the metric_descriptor cannot be updated once initially configured. New labels can be added in the metric_descriptor, but existing labels cannot be modified except for their description.

Optional. A map from a label key string to an extractor expression which is used to extract data from a log entry field and assign as the label value. Each label key specified in the LabelDescriptor must have an associated extractor expression in this map. The syntax of the extractor expression is the same as for the value_extractor field. The extracted value is converted to the type defined in the label descriptor. If the either the extraction or the type conversion fails, the label will have a default value. The default value for a string label is an empty string, for an integer label its 0, and for a boolean label its false. Note that there are upper bounds on the maximum number of labels and the number of active time series that are allowed in a project.

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

Deprecated. The API version that created or updated this metric. The v2 format is used by default and cannot be changed.

LogSink

Describes a sink used to export log entries to one of the following destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which log entries are exported. The sink must be created within a project, organization, billing account, or folder.

Required. The export destination: :: "storage.googleapis.com/[GCS_BUCKET]" "bigquery.googleapis .com/projects/[PROJECT_ID]/datasets/[DATASET]" "pubsub.goo gleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" The sink's writer_identity, set when the sink is created, must have permission to write to the destination or else the log entries are not exported. For more information, see Exporting Logs with Sinks </logging/docs/api/tasks/exporting-logs>__.

Optional. A description of this sink. The maximum length of the description is 8000 characters.

Deprecated. The log entry format to use for this sink's exported log entries. The v2 format is used by default and cannot be changed.

Optional. This field applies only to sinks owned by organizations and folders. If the field is false, the default, only the logs owned by the sink's parent resource are available for export. If the field is true, then logs from all the projects, folders, and billing accounts contained in the sink's parent resource are also available for export. Whether a particular log entry from the children is exported depends on the sink's filter expression. For example, if this field is true, then the filter resource.type=gce_instance would export all Compute Engine VM instance log entries from all projects in the sink's parent. To only export entries from certain child projects, filter on the project part of the log name: :: logName:("projects/test-project1/" OR "projects/test-project2/") AND resource.type=gce_instance

Optional. Options that affect sinks exporting data to BigQuery.

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

Do not use. This field is ignored.

MessageOptions

API documentation for logging_v2.types.MessageOptions class.

MethodDescriptorProto

API documentation for logging_v2.types.MethodDescriptorProto class.

MethodOptions

API documentation for logging_v2.types.MethodOptions class.

Metric

API documentation for logging_v2.types.Metric class.

MetricDescriptor

API documentation for logging_v2.types.MetricDescriptor class.

MonitoredResource

API documentation for logging_v2.types.MonitoredResource class.

MonitoredResourceDescriptor

API documentation for logging_v2.types.MonitoredResourceDescriptor class.

MonitoredResourceMetadata

API documentation for logging_v2.types.MonitoredResourceMetadata class.

OneofDescriptorProto

API documentation for logging_v2.types.OneofDescriptorProto class.

OneofOptions

API documentation for logging_v2.types.OneofOptions class.

ServiceDescriptorProto

API documentation for logging_v2.types.ServiceDescriptorProto class.

ServiceOptions

API documentation for logging_v2.types.ServiceOptions class.

SourceCodeInfo

API documentation for logging_v2.types.SourceCodeInfo class.

Status

API documentation for logging_v2.types.Status class.

Struct

API documentation for logging_v2.types.Struct class.

Timestamp

API documentation for logging_v2.types.Timestamp class.

UninterpretedOption

API documentation for logging_v2.types.UninterpretedOption class.

UpdateCmekSettingsRequest

The parameters to UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings].

See Enabling CMEK for Logs Router </logging/docs/routing/managed-encryption>__ for more information.

Required. The CMEK settings to update. See Enabling CMEK for Logs Router </logging/docs/routing/managed-encryption>__ for more information.

UpdateExclusionRequest

The parameters to UpdateExclusion.

Required. New values for the existing exclusion. Only the fields specified in update_mask are relevant.

UpdateLogMetricRequest

The parameters to UpdateLogMetric.

Required. The updated metric.

UpdateSinkRequest

The parameters to UpdateSink.

Required. The updated sink, whose name is the same identifier that appears as part of sink_name.

Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated. An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error. For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/ google.protobuf#google.protobuf.FieldMask Example: updateMask=filter.

Value

API documentation for logging_v2.types.Value class.

WriteLogEntriesPartialErrors

Error details for WriteLogEntries with partial success.

WriteLogEntriesRequest

The parameters to WriteLogEntries.

Optional. A default monitored resource object that is assigned to all log entries in entries that do not specify a value for resource. Example: :: { "type": "gce_instance", "labels": { "zone": "us-central1-a", "instance_id": "00000000000000000000" }} See LogEntry][google.logging.v2.LogEntry].

Required. The log entries to send to Logging. The order of log entries in this list does not matter. Values supplied in this method's log_name, resource, and labels fields are copied into those log entries in this list that do not include values for their corresponding fields. For more information, see the LogEntry][google.logging.v2.LogEntry] type. If the timestamp or insert_id fields are missing in log entries, then this method supplies the current time or a unique identifier, respectively. The supplied values are chosen so that, among the log entries that did not supply their own values, the entries earlier in the list will sort before the entries later in the list. See the entries.list method. Log entries with timestamps that are more than the logs retention period </logging/quota-policy> in the past or more than 24 hours in the future will not be available when calling entries.list. However, those log entries can still be exported with LogSinks </logging/docs/api/tasks/exporting- logs>. To improve throughput and to avoid exceeding the quota limit </logging/quota-policy>__ for calls to entries.write, you should try to include several log entries in this list, rather than calling this method for each individual log entry.

Optional. If true, the request should expect normal response, but the entries won't be persisted nor exported. Useful for checking whether the logging API endpoints are working properly before sending valuable data.

WriteLogEntriesResponse

Result returned from WriteLogEntries. empty