Index
ConfigServiceV2
(interface)LoggingServiceV2
(interface)MetricsServiceV2
(interface)BigQueryOptions
(message)CmekSettings
(message)CreateBucketRequest
(message)CreateExclusionRequest
(message)CreateLogMetricRequest
(message)CreateSinkRequest
(message)CreateViewRequest
(message)DeleteBucketRequest
(message)DeleteExclusionRequest
(message)DeleteLogMetricRequest
(message)DeleteLogRequest
(message)DeleteSinkRequest
(message)DeleteViewRequest
(message)GetBucketRequest
(message)GetCmekSettingsRequest
(message)GetExclusionRequest
(message)GetLogMetricRequest
(message)GetSinkRequest
(message)GetViewRequest
(message)LifecycleState
(enum)ListBucketsRequest
(message)ListBucketsResponse
(message)ListExclusionsRequest
(message)ListExclusionsResponse
(message)ListLogEntriesRequest
(message)ListLogEntriesResponse
(message)ListLogMetricsRequest
(message)ListLogMetricsResponse
(message)ListLogsRequest
(message)ListLogsResponse
(message)ListMonitoredResourceDescriptorsRequest
(message)ListMonitoredResourceDescriptorsResponse
(message)ListSinksRequest
(message)ListSinksResponse
(message)ListViewsRequest
(message)ListViewsResponse
(message)LogBucket
(message)LogEntry
(message)LogEntryOperation
(message)LogEntrySourceLocation
(message)LogExclusion
(message)LogMetric
(message)LogMetric.ApiVersion
(enum)LogSink
(message)LogSink.VersionFormat
(enum)LogView
(message)TailLogEntriesRequest
(message)TailLogEntriesResponse
(message)TailLogEntriesResponse.SuppressionInfo
(message)TailLogEntriesResponse.SuppressionInfo.Reason
(enum)UndeleteBucketRequest
(message)UpdateBucketRequest
(message)UpdateCmekSettingsRequest
(message)UpdateExclusionRequest
(message)UpdateLogMetricRequest
(message)UpdateSinkRequest
(message)UpdateViewRequest
(message)WriteLogEntriesPartialErrors
(message)WriteLogEntriesRequest
(message)WriteLogEntriesResponse
(message)
ConfigServiceV2
Service for configuring sinks used to route log entries.
CreateBucket | |
---|---|
Creates a bucket that can be used to store log entries. Once a bucket has been created, the region cannot be changed.
|
CreateExclusion | |
---|---|
Creates a new exclusion in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource.
|
CreateSink | |
---|---|
Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's
|
CreateView | |
---|---|
Creates a view over logs in a bucket. A bucket may contain a maximum of 50 views.
|
DeleteBucket | |
---|---|
Deletes a bucket. Moves the bucket to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all logs in the bucket will be permanently deleted.
|
DeleteExclusion | |
---|---|
Deletes an exclusion.
|
DeleteSink | |
---|---|
Deletes a sink. If the sink has a unique
|
DeleteView | |
---|---|
Deletes a view from a bucket.
|
GetBucket | |
---|---|
Gets a bucket.
|
GetCmekSettings | |
---|---|
Gets the Logs Router CMEK settings for the given 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 for more information.
|
GetExclusion | |
---|---|
Gets the description of an exclusion.
|
GetSink | |
---|---|
Gets a sink.
|
GetView | |
---|---|
Gets a view.
|
ListBuckets | |
---|---|
Lists buckets.
|
ListExclusions | |
---|---|
Lists all the exclusions in a parent resource.
|
ListSinks | |
---|---|
Lists sinks.
|
ListViews | |
---|---|
Lists views on a bucket.
|
UndeleteBucket | |
---|---|
Undeletes a bucket. A bucket that has been deleted may be undeleted within the grace period of 7 days.
|
UpdateBucket | |
---|---|
Updates a bucket. This method replaces the following fields in the existing bucket with values from the new bucket: If the retention period is decreased and the bucket is locked, FAILED_PRECONDITION will be returned. If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION will be returned. A buckets region may not be modified after it is created.
|
UpdateCmekSettings | |
---|---|
Updates the Logs Router CMEK settings for the given 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 for more information.
|
UpdateExclusion | |
---|---|
Changes one or more properties of an existing exclusion.
|
UpdateSink | |
---|---|
Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: The updated sink might also have a new
|
UpdateView | |
---|---|
Updates a view. This method replaces the following fields in the existing view with values from the new view:
|
LoggingServiceV2
Service for ingesting and querying logs.
DeleteLog | |
---|---|
Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. Entries received after the delete operation with a timestamp before the operation will be deleted.
|
ListLogEntries | |
---|---|
Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log entries, see Exporting Logs.
|
ListLogs | |
---|---|
Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.
|
ListMonitoredResourceDescriptors | |
---|---|
Lists the descriptors for monitored resource types used by Logging.
|
TailLogEntries | |
---|---|
Streaming read of log entries as they are ingested. Until the stream is terminated, it will continue reading logs.
|
WriteLogEntries | |
---|---|
Writes log entries to Logging. This API method is the only way to send log entries to Logging. This method is used, directly or indirectly, by the Logging agent (fluentd) and all logging libraries configured to use Logging. A single request may contain log entries for a maximum of 1000 different resources (projects, organizations, billing accounts or folders)
|
MetricsServiceV2
Service for configuring logs-based metrics.
CreateLogMetric | |
---|---|
Creates a logs-based metric.
|
DeleteLogMetric | |
---|---|
Deletes a logs-based metric.
|
GetLogMetric | |
---|---|
Gets a logs-based metric.
|
ListLogMetrics | |
---|---|
Lists logs-based metrics.
|
UpdateLogMetric | |
---|---|
Creates or updates a logs-based metric.
|
BigQueryOptions
Options that change functionality of a sink exporting data to BigQuery.
Fields | |
---|---|
use_partitioned_tables |
Optional. Whether to use BigQuery's partition tables. By default, Logging creates dated tables based on the log entries' timestamps, e.g. syslog_20170523. With partitioned tables the date suffix is no longer present and special query syntax has to be used instead. In both cases, tables are sharded based on UTC timezone. |
uses_timestamp_column_partitioning |
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 for more information.
Fields | |
---|---|
name |
Output only. The resource name of the CMEK settings. |
kms_key_name |
The resource name for the configured Cloud KMS key. KMS key name format: "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" For example: To enable CMEK for the Logs Router, set this field to a valid The Cloud KMS key used by the Log Router can be updated by changing the To disable CMEK for the Logs Router, set this field to an empty string. See Enabling CMEK for Logs Router for more information. |
service_account_id |
Output only. The service account that will be used by the Logs Router to access your Cloud KMS key. Before enabling CMEK for Logs Router, you must first assign the role See Enabling CMEK for Logs Router for more information. |
CreateBucketRequest
The parameters to CreateBucket
.
Fields | |
---|---|
parent |
Required. The resource in which to create the bucket:
Example: Authorization requires the following IAM permission on the specified resource
|
bucket_id |
Required. A client-assigned identifier such as |
bucket |
Required. The new bucket. The region specified in the new bucket must be compliant with any Location Restriction Org Policy. The name field in the bucket is ignored. |
CreateExclusionRequest
The parameters to CreateExclusion
.
Fields | |
---|---|
parent |
Required. The parent resource in which to create the exclusion:
Examples: Authorization requires the following IAM permission on the specified resource
|
exclusion |
Required. The new exclusion, whose |
CreateLogMetricRequest
The parameters to CreateLogMetric.
Fields | |
---|---|
parent |
Required. The resource name of the project in which to create the metric:
The new metric must be provided in the request. Authorization requires the following IAM permission on the specified resource
|
metric |
Required. The new logs-based metric, which must not have an identifier that already exists. |
CreateSinkRequest
The parameters to CreateSink
.
Fields | |
---|---|
parent |
Required. The resource in which to create the sink:
Examples: Authorization requires the following IAM permission on the specified resource
|
sink |
Required. The new sink, whose |
unique_writer_identity |
Optional. Determines the kind of IAM identity returned as If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of |
CreateViewRequest
The parameters to CreateView
.
Fields | |
---|---|
parent |
Required. The bucket in which to create the view
Example: Authorization requires the following IAM permission on the specified resource
|
view_id |
Required. The id to use for this view. |
view |
Required. The new view. |
DeleteBucketRequest
The parameters to DeleteBucket
.
Fields | |
---|---|
name |
Required. The full resource name of the bucket to delete.
Example: Authorization requires the following IAM permission on the specified resource
|
DeleteExclusionRequest
The parameters to DeleteExclusion
.
Fields | |
---|---|
name |
Required. The resource name of an existing exclusion to delete:
Example: Authorization requires the following IAM permission on the specified resource
|
DeleteLogMetricRequest
The parameters to DeleteLogMetric.
Fields | |
---|---|
metric_name |
Required. The resource name of the metric to delete:
Authorization requires the following IAM permission on the specified resource
|
DeleteLogRequest
The parameters to DeleteLog.
Fields | |
---|---|
log_name |
Required. The resource name of the log to delete:
Authorization requires the following IAM permission on the specified resource
|
DeleteSinkRequest
The parameters to DeleteSink
.
Fields | |
---|---|
sink_name |
Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:
Example: Authorization requires the following IAM permission on the specified resource
|
DeleteViewRequest
The parameters to DeleteView
.
Fields | |
---|---|
name |
Required. The full resource name of the view to delete:
Example: Authorization requires the following IAM permission on the specified resource
|
GetBucketRequest
The parameters to GetBucket
.
Fields | |
---|---|
name |
Required. The resource name of the bucket:
Example: Authorization requires the following IAM permission on the specified resource
|
GetCmekSettingsRequest
The parameters to GetCmekSettings
.
See Enabling CMEK for Logs Router for more information.
Fields | |
---|---|
name |
Required. The resource for which to retrieve CMEK settings.
Example: 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. Authorization requires the following IAM permission on the specified resource
|
GetExclusionRequest
The parameters to GetExclusion
.
Fields | |
---|---|
name |
Required. The resource name of an existing exclusion:
Example: Authorization requires the following IAM permission on the specified resource
|
GetLogMetricRequest
The parameters to GetLogMetric.
Fields | |
---|---|
metric_name |
Required. The resource name of the desired metric:
Authorization requires the following IAM permission on the specified resource
|
GetSinkRequest
The parameters to GetSink
.
Fields | |
---|---|
sink_name |
Required. The resource name of the sink:
Example: Authorization requires the following IAM permission on the specified resource
|
GetViewRequest
The parameters to GetView
.
Fields | |
---|---|
name |
Required. The resource name of the policy:
Example: Authorization requires the following IAM permission on the specified resource
|
LifecycleState
LogBucket lifecycle states.
Enums | |
---|---|
LIFECYCLE_STATE_UNSPECIFIED |
Unspecified state. This is only used/useful for distinguishing unset values. |
ACTIVE |
The normal and active state. |
DELETE_REQUESTED |
The bucket has been marked for deletion by the user. |
ListBucketsRequest
The parameters to ListBuckets
.
Fields | |
---|---|
parent |
Required. The parent resource whose buckets are to be listed:
Note: The locations portion of the resource must be specified, but supplying the character Authorization requires the following IAM permission on the specified resource
|
page_token |
Optional. If present, then retrieve the next batch of results from the preceding call to this method. |
page_size |
Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of |
ListBucketsResponse
The response from ListBuckets.
Fields | |
---|---|
buckets[] |
A list of buckets. |
next_page_token |
If there might be more results than appear in this response, then |
ListExclusionsRequest
The parameters to ListExclusions
.
Fields | |
---|---|
parent |
Required. The parent resource whose exclusions are to be listed.
Authorization requires the following IAM permission on the specified resource
|
page_token |
Optional. If present, then retrieve the next batch of results from the preceding call to this method. |
page_size |
Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of |
ListExclusionsResponse
Result returned from ListExclusions
.
Fields | |
---|---|
exclusions[] |
A list of exclusions. |
next_page_token |
If there might be more results than appear in this response, then |
ListLogEntriesRequest
The parameters to ListLogEntries
.
Fields | |
---|---|
project_ids[] |
Optional. Deprecated. Use |
resource_names[] |
Required. Names of one or more parent resources from which to retrieve log entries:
May alternatively be one or more views projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] Projects listed in the Authorization requires one or more of the following IAM permissions on the specified resource
|
filter |
Optional. A filter that chooses which log entries to return. See Advanced Logs Queries. Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in |
order_by |
Optional. How the results should be sorted. Presently, the only permitted values are |
page_size |
Optional. The maximum number of results to return from this request. Default is 50. If the value is negative or exceeds 1000, the request is rejected. The presence of |
page_token |
Optional. If present, then retrieve the next batch of results from the preceding call to this method. |
ListLogEntriesResponse
Result returned from ListLogEntries
.
Fields | |
---|---|
entries[] |
A list of log entries. If |
next_page_token |
If there might be more results than those appearing in this response, then If a value for |
ListLogMetricsRequest
The parameters to ListLogMetrics.
Fields | |
---|---|
parent |
Required. The name of the project containing the metrics:
Authorization requires the following IAM permission on the specified resource
|
page_token |
Optional. If present, then retrieve the next batch of results from the preceding call to this method. |
page_size |
Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of |
ListLogMetricsResponse
Result returned from ListLogMetrics.
Fields | |
---|---|
metrics[] |
A list of logs-based metrics. |
next_page_token |
If there might be more results than appear in this response, then |
ListLogsRequest
The parameters to ListLogs.
Fields | |
---|---|
parent |
Required. The resource name that owns the logs:
Authorization requires the following IAM permission on the specified resource
|
page_size |
Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of |
page_token |
Optional. If present, then retrieve the next batch of results from the preceding call to this method. |
resource_names[] |
Optional. The resource name that owns the logs: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] To support legacy queries, it could also be: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" Authorization requires the following IAM permission on the specified resource
|
ListLogsResponse
Result returned from ListLogs.
Fields | |
---|---|
log_names[] |
A list of log names. For example, |
next_page_token |
If there might be more results than those appearing in this response, then |
ListMonitoredResourceDescriptorsRequest
The parameters to ListMonitoredResourceDescriptors
Fields | |
---|---|
page_size |
Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of |
page_token |
Optional. If present, then retrieve the next batch of results from the preceding call to this method. |
ListMonitoredResourceDescriptorsResponse
Result returned from ListMonitoredResourceDescriptors.
Fields | |
---|---|
resource_descriptors[] |
A list of resource descriptors. |
next_page_token |
If there might be more results than those appearing in this response, then |
ListSinksRequest
The parameters to ListSinks
.
Fields | |
---|---|
parent |
Required. The parent resource whose sinks are to be listed:
Authorization requires the following IAM permission on the specified resource
|
page_token |
Optional. If present, then retrieve the next batch of results from the preceding call to this method. |
page_size |
Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of |
ListSinksResponse
Result returned from ListSinks
.
Fields | |
---|---|
sinks[] |
A list of sinks. |
next_page_token |
If there might be more results than appear in this response, then |
ListViewsRequest
The parameters to ListViews
.
Fields | |
---|---|
parent |
Required. The bucket whose views are to be listed:
Authorization requires the following IAM permission on the specified resource
|
page_token |
Optional. If present, then retrieve the next batch of results from the preceding call to this method. |
page_size |
Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of |
ListViewsResponse
The response from ListViews.
Fields | |
---|---|
views[] |
A list of views. |
next_page_token |
If there might be more results than appear in this response, then |
LogBucket
Describes a repository of logs.
Fields | |
---|---|
name |
Output only. The resource name of the bucket. For example: "projects/my-project-id/locations/my-location/buckets/my-bucket-id" The supported locations are: For the location of |
description |
Describes this bucket. |
create_time |
Output only. The creation timestamp of the bucket. This is not set for any of the default buckets. |
update_time |
Output only. The last update timestamp of the bucket. |
retention_days |
Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used. |
locked |
Whether the bucket has been locked. The retention period on a locked bucket may not be changed. Locked buckets may only be deleted if they are empty. |
lifecycle_state |
Output only. The bucket lifecycle state. |
LogEntry
An individual entry in a log.
Fields | ||
---|---|---|
log_name |
Required. The resource name of the log to which this log entry belongs:
A project number may be used in place of PROJECT_ID. The project number is translated to its corresponding PROJECT_ID internally and the
For backward compatibility, if |
|
resource |
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. |
|
timestamp |
Optional. The time the event described by the log entry occurred. This time is used to compute the log entry's age and to enforce the logs retention period. If this field is omitted in a new log entry, then Logging assigns it the current time. Timestamps have nanosecond accuracy, but trailing zeros in the fractional seconds might be omitted when the timestamp is displayed. Incoming log entries must have timestamps that don't exceed the logs retention period in the past, and that don't exceed 24 hours in the future. Log entries outside those time boundaries aren't ingested by Logging. |
|
receive_timestamp |
Output only. The time the log entry was received by Logging. |
|
severity |
Optional. The severity of the log entry. The default value is |
|
insert_id |
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 If the In queries, the |
|
http_request |
Optional. Information about the HTTP request associated with this log entry, if applicable. |
|
labels |
Optional. A set of user-defined (key, value) data that provides additional information about the log entry. Cloud Logging truncates label keys that exceed 512 B and label values that exceed 64 KB upon their associated log entry being written. The truncation is indicated by an ellipsis at the end of the character string. |
|
metadata |
Output only. Deprecated. Additional metadata about the monitored resource. Only |
|
operation |
Optional. Information about an operation associated with the log entry, if applicable. |
|
trace |
Optional. Resource name of the trace associated with the log entry, if any. If it contains a relative resource name, the name is assumed to be relative to |
|
span_id |
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 |
|
trace_sampled |
Optional. The sampling decision of the trace associated with the log entry. True means that the trace resource name in the |
|
source_location |
Optional. Source code location information associated with the log entry, if any. |
|
Union field payload . The log entry payload, which can be one of multiple types. payload can be only one of the following: |
||
proto_payload |
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" |
|
text_payload |
The log entry payload, represented as a Unicode string (UTF-8). |
|
json_payload |
The log entry payload, represented as a structure that is expressed as a JSON object. |
LogEntryOperation
Additional information about a potentially long-running operation with which a log entry is associated.
Fields | |
---|---|
id |
Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation. |
producer |
Optional. An arbitrary producer identifier. The combination of |
first |
Optional. Set this to True if this is the first log entry in the operation. |
last |
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.
Fields | |
---|---|
file |
Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name. |
line |
Optional. Line within the source file. 1-based; 0 indicates no line number available. |
function |
Optional. Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information may be used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: |
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.
Fields | |
---|---|
name |
Required. A client-assigned identifier, such as |
description |
Optional. A description of this exclusion. |
filter |
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:
|
disabled |
Optional. If set to True, then this exclusion is disabled and it does not exclude any log entries. You can |
create_time |
Output only. The creation timestamp of the exclusion. This field may not be present for older exclusions. |
update_time |
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 metrics can also be used to extract values from logs and create 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.
Fields | |
---|---|
name |
Required. The client-assigned metric identifier. Examples: Metric identifiers are limited to 100 characters and can include only the following characters: The metric identifier in this field must not be URL-encoded. However, when the metric identifier appears as the |
description |
Optional. A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters. |
filter |
Required. An advanced logs filter which is used to match log entries. Example:
The maximum length of the filter is 20000 characters. |
metric_descriptor |
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 The 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 Each label in the metric descriptor must have a matching label name as the key and an extractor expression as the value in the The |
value_extractor |
Optional. A The result of the extraction must be convertible to a double type, as the distribution always records double values. If either the extraction or the conversion to double fails, then those values are not recorded in the distribution. Example: |
label_extractors |
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 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 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. |
bucket_options |
Optional. The |
create_time |
Output only. The creation timestamp of the metric. This field may not be present for older metrics. |
update_time |
Output only. The last update timestamp of the metric. This field may not be present for older metrics. |
version |
Deprecated. The API version that created or updated this metric. The v2 format is used by default and cannot be changed. |
ApiVersion
Logging API version.
Enums | |
---|---|
V2 |
Logging API v2. |
V1 |
Logging API v1. |
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, a Cloud Pub/Sub topic or a Cloud Logging Bucket. A logs filter controls which log entries are exported. The sink must be created within a project, organization, billing account, or folder.
Fields | |
---|---|
name |
Required. The client-assigned sink identifier, unique within the project. Example: |
destination |
Required. The export destination:
The sink's |
filter |
Optional. An advanced logs filter. The only exported log entries are those that are in the resource owning the sink and that match the filter. For example:
|
description |
Optional. A description of this sink. The maximum length of the description is 8000 characters. |
disabled |
Optional. If set to True, then this sink is disabled and it does not export any log entries. |
exclusions[] |
Optional. Log entries that match any of the exclusion filters will not be exported. If a log entry is matched by both |
output_version_format |
Deprecated. This field is unused. |
writer_identity |
Output only. An IAM identity—a service account or group—under which Logging writes the exported log entries to the sink's destination. This field is set by Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see Granting Access for a Resource. Consult the destination service's documentation to determine the appropriate IAM roles to assign to the identity. |
include_children |
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
|
create_time |
Output only. The creation timestamp of the sink. This field may not be present for older sinks. |
update_time |
Output only. The last update timestamp of the sink. This field may not be present for older sinks. |
bigquery_options |
Optional. Options that affect sinks exporting data to BigQuery. |
VersionFormat
Deprecated. This is unused.
Enums | |
---|---|
VERSION_FORMAT_UNSPECIFIED |
An unspecified format version that will default to V2. |
V2 |
LogEntry version 2 format. |
V1 |
LogEntry version 1 format. |
LogView
Describes a view over logs in a bucket.
Fields | |
---|---|
name |
The resource name of the view. For example "projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view |
description |
Describes this view. |
create_time |
Output only. The creation timestamp of the view. |
update_time |
Output only. The last update timestamp of the view. |
filter |
Filter that restricts which log entries in a bucket are visible in this view. Filters are restricted to be a logical AND of ==/!= of any of the following: originating project/folder/organization/billing account. resource type log id Example: SOURCE("projects/myproject") AND resource.type = "gce_instance" AND LOG_ID("stdout") |
TailLogEntriesRequest
The parameters to TailLogEntries
.
Fields | |
---|---|
resource_names[] |
Required. Name of a parent resource from which to retrieve log entries:
May alternatively be one or more views: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" "organization/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" Authorization requires one or more of the following IAM permissions on the specified resource
|
filter |
Optional. A filter that chooses which log entries to return. See Advanced Logs Filters. Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in |
buffer_window |
Optional. The amount of time to buffer log entries at the server before being returned to prevent out of order results due to late arriving log entries. Valid values are between 0-60000 milliseconds. Defaults to 2000 milliseconds. |
TailLogEntriesResponse
Result returned from TailLogEntries
.
Fields | |
---|---|
entries[] |
A list of log entries. Each response in the stream will order entries with increasing values of |
suppression_info[] |
If entries that otherwise would have been included in the session were not sent back to the client, counts of relevant entries omitted from the session with the reason that they were not included. There will be at most one of each reason per response. The counts represent the number of suppressed entries since the last streamed response. |
SuppressionInfo
Information about entries that were omitted from the session.
Fields | |
---|---|
reason |
The reason that entries were omitted from the session. |
suppressed_count |
A lower bound on the count of entries omitted due to |
Reason
An indicator of why entries were omitted.
Enums | |
---|---|
REASON_UNSPECIFIED |
Unexpected default. |
RATE_LIMIT |
Indicates suppression occurred due to relevant entries being received in excess of rate limits. For quotas and limits, see Logging API quotas and limits. |
NOT_CONSUMED |
Indicates suppression occurred due to the client not consuming responses quickly enough. |
UndeleteBucketRequest
The parameters to UndeleteBucket
.
Fields | |
---|---|
name |
Required. The full resource name of the bucket to undelete.
Example: Authorization requires the following IAM permission on the specified resource
|
UpdateBucketRequest
The parameters to UpdateBucket
.
Fields | |
---|---|
name |
Required. The full resource name of the bucket to update.
Example: Authorization requires the following IAM permission on the specified resource
|
bucket |
Required. The updated bucket. |
update_mask |
Required. Field mask that specifies the fields in For a detailed Example: |
UpdateCmekSettingsRequest
The parameters to UpdateCmekSettings
.
See Enabling CMEK for Logs Router for more information.
Fields | |
---|---|
name |
Required. The resource name for the CMEK settings to update.
Example: 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. Authorization requires the following IAM permission on the specified resource
|
cmek_settings |
Required. The CMEK settings to update. See Enabling CMEK for Logs Router for more information. |
update_mask |
Optional. Field mask identifying which fields from See Example: |
UpdateExclusionRequest
The parameters to UpdateExclusion
.
Fields | |
---|---|
name |
Required. The resource name of the exclusion to update:
Example: Authorization requires the following IAM permission on the specified resource
|
exclusion |
Required. New values for the existing exclusion. Only the fields specified in |
update_mask |
Required. A non-empty list of fields to change in the existing exclusion. New values for the fields are taken from the corresponding fields in the For example, to change the filter and description of an exclusion, specify an |
UpdateLogMetricRequest
The parameters to UpdateLogMetric.
Fields | |
---|---|
metric_name |
Required. The resource name of the metric to update:
The updated metric must be provided in the request and it's Authorization requires the following IAM permission on the specified resource
|
metric |
Required. The updated metric. |
UpdateSinkRequest
The parameters to UpdateSink
.
Fields | |
---|---|
sink_name |
Required. The full resource name of the sink to update, including the parent resource and the sink identifier:
Example: Authorization requires the following IAM permission on the specified resource
|
sink |
Required. The updated sink, whose name is the same identifier that appears as part of |
unique_writer_identity |
Optional. See
|
update_mask |
Optional. Field mask that specifies the fields in 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 Example: |
UpdateViewRequest
The parameters to UpdateView
.
Fields | |
---|---|
name |
Required. The full resource name of the view to update
Example: Authorization requires the following IAM permission on the specified resource
|
view |
Required. The updated view. |
update_mask |
Optional. Field mask that specifies the fields in For a detailed Example: |
WriteLogEntriesPartialErrors
Error details for WriteLogEntries with partial success.
Fields | |
---|---|
log_entry_errors |
When Failed requests for which no entries are written will not include per-entry errors. |
WriteLogEntriesRequest
The parameters to WriteLogEntries.
Fields | |
---|---|
log_name |
Optional. A default log resource name that is assigned to all log entries in
The permission Authorization requires the following IAM permission on the specified resource
|
resource |
Optional. A default monitored resource object that is assigned to all log entries in
See |
labels |
Optional. Default labels that are added to the |
entries[] |
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 If the Log entries with timestamps that are more than the logs retention period in the past or more than 24 hours in the future will not be available when calling To improve throughput and to avoid exceeding the quota limit for calls to Authorization requires the following IAM permission on the specified resource
|
partial_success |
Optional. Whether valid entries should be written even if some other entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not written, then the response status is the error associated with one of the failed entries and the response includes error details keyed by the entries' zero-based index in the |
dry_run |
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.